Author Topic: AutoCompleteEditor Filter Change Event Does not Fire  (Read 3663 times)

jax

  • Newbie
  • *
  • Posts: 16
    • View Profile
AutoCompleteEditor Filter Change Event Does not Fire
« on: June 24, 2014, 08:38:44 am »
I have a filter on the column below using an autoCompleteEditor, however, when the selection is changed the change event does not fire. Only if you actually type something else into the text box and hit enter will the event fire. None of the demo examples are using the autocomplete filter so I am wondering is this a limitation of the listeners or the grid itself?

{
                title: 'Facility', width: 150, dataIndx: 'FacilityName', dataType: 'string',
                editor: {type: 'select',options: facilities,},
                filter: { type: 'textbox', condition: "contain", init: autoCompleteEditor, listeners: ['change'] }
}


        var autoCompleteEditor = function (ui) {
            $(this).autocomplete({
                source: facilities,
                selectItem: { on: true },
                highlightText: { on: true },
                minLength: 0,               
            }).focus(function () {
                $(this).autocomplete("search", "");
            });
        }

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: AutoCompleteEditor Filter Change Event Does not Fire
« Reply #1 on: June 24, 2014, 10:46:34 am »
you could fire the change event in autoCompleteEditor upon select event.

var autoCompleteEditor = function (ui) {
            $(this).autocomplete({
                source: facilities,
                selectItem: { on: true },
                highlightText: { on: true },
                select: function(evt, ui){
                    //fire change event
                },
                minLength: 0,               
            }).focus(function () {
                $(this).autocomplete("search", "");
            })
        }