Fix "undefined" text on search

This commit is contained in:
Anaggh S 2020-05-26 19:20:34 +05:30
parent caeef10df2
commit 8d27f2a0c0
1 changed files with 7 additions and 1 deletions

View File

@ -47,6 +47,9 @@
theme: "bootstrap4",
minimumInputLength: 2,
dropdownParent: "#jsclippyContainer",
language: {
inputTooShort: function () { return ''; }
},
ajax: {
url: HTML_PATH_ADMIN_ROOT+"ajax/clippy",
data: function (params) {
@ -58,7 +61,10 @@
}
},
templateResult: function(data) {
console.log(data);
// console.log(data);
if (typeof data.id === 'undefined') {
return '';
}
var html = '';
if (data.type=='menu') {
html += '<a href="'+data.url+'"><div class="search-suggestion">';