Stop Onchange Handler For Certain Fields In Cgridview's Filter Row?

Hi all,

I’ve run in to a frustrating issue I’m not sure how to resolve. I have a CGridView with a fairly complex set of filters. One of the filters I’ve added in is based on this great Bootstrap Multiselect.

Here’s the problem: One of my filters is a multiselect (select list with multiple selections allowed). When the user selects one item in the list, Yii is refreshing the grid because of a hook on the change event of the multiselect. This is a problem because the user may want to select many items in the filter before the grid refreshes. What I’m trying to accomplish is allowing the user to select multiple items in the multiselect list and then refresh the grid when they’re done (I don’t mind calling the grid’s update() programmatically if I need to - I just want it to stop doing it for me for this one specific input field!)

I’ve tried all sorts of things, including stopPropagation on the input element. At this point I’m starting to think I may need to disable Yii’s built in ajax updating and implement a slight variation.

Any suggestions?

You could add delay on change event that fires the ajax request, to wait for few more minutes in case user wants a select multiple items