src/grid-filter.js
function (item) {
            if($.isEmptyObject(item)){
              var tempObj={ id: $('input:first', el).val(), name: $('input:first', el).val()};
              return [tempObj];
            }else{
              return item;
            }
          }
function (item) {
            if($.isEmptyObject(item)){
              var tempObj={ id: $('input:first', el).val(), name: $('input:first', el).val()};
              return [tempObj];
            }else{
              return item;
            }
          }
function ( item ) { if ( $ . isEmptyObject ( item ) ) { var tempObj = { id : $ ( 'input:first' , el ) . val ( ) , name : $ ( 'input:first' , el ) . val ( ) } ; return [ tempObj ] ; } else { return item ; } }
onResult is used to pre-process suggestions.
In our case we want to show current item if there is no results.
onResult is used to pre - process suggestions . In our case we want to show current item if there is no results .