Clearing the combo filter

To clear the combol filter, you have given the following solution on your knowledgebase

for(var i=0; i<this.optionsArr.length; i++){

var z=filter.test(this.optionsArr[i].text)||(this.optionsArr[i].text=="");

Where do I put this code and how do I use it.

Can you please point to the original topic, I’m not pretty sure to which use-case mentioned code was related.

Most probably it mentioned code of dhtmlxcombo.js , lines 962-963
for(var i=0; i<this.optionsArr.length; i++){
var z=filter.test(this.optionsArr[i].text);
which can be replaced with mentioned lines

I have #combo_filter added to my grid. User selects one of the entry from this filter. The grid gets refreshed based on the user selection. Now the user wants to clear the selection and gets back to original list. Now the user sees only the entry he has selected in the filter combo. It will be better if he sees a blank row also so that he can get the original list and grid back

The combo in filtering mode shows only options which equal to the entered text, so it not possible to show an empty line.
If you have not so many options, usage of #select_filter may be more useful.

The code modification described above, will change logic of combo, so it will always show option with empty text in filtering mode.

Before I could see your response, I updated dhtmlxcombo.js with the following
var z=filter.test(this.optionsArr[i].text)||(this.optionsArr[i].text=="");

and started testing my combo_filter in my grid. Now I see a change. When I select an entry from the combo filter, grid gets refreshed. The combo text shows the selected value. Now I clicked on the twistie to see anything in the dropdown, the combo text is set to empty and the dropdown has only one entry I selected. Since the combo text is empty, I hit enter to refresh the grid. This never used to happen without this fix. Am I right to assume this solution?

Am I right to assume this solution?
It possible to add visible empty option to improve usability. Please check sample ( sent by email ) - it contains combo and filter extension updated in necessary way.