We founded a possible bug in igCombo using multiSelection and filtering
or at least we don't understand how the filter is working.
The filter text is not reset after closing the drowdown,
so the dropdown remains filtered and there is no way to "see" other items
except searching some other words
or adding ", " (that is our separator)
We were not able to find a way to solve the issue,
- we tried to bind again every time the dropdown is closed but i don't like this approach.
- we tried removing multiSelection: 'onwithcheckboxes' and the behaviour is the one we expected, the dropdown clears the filter every time it opens the ddl, but we need multiselection so we can't accept that solution.
- we tried adding ", " to the text field after closing the ddl but it's not working
This is the jsfiddler to reproduce the error
http://jsfiddle.net/nrgjack/teffh8jt/
do you know a way to clear the filter ?
i would put it in the igcombodropdownclosed
to show other items re-opening the dropdown
thanks
Giacomo
Hello NrgJack,
Thank you for posting in our forums!
You were on the right track to a solution for this with binding during the dropDownClosing event. Instead of rebinding, you can call the filter method programmatically to filter by an empty string. As a note, if you clear the filter during dropDownClosing, the default filtered item will not be selected when the drop down closes, similar to the behavior with single selection as you mentioned. If you clear the filter during the dropDownClosed event, the auto-matched filtered item will be set in the igCombo's value.
I have modified your jsFiddle to achieve this using dropDownClosing here:
http://jsfiddle.net/ig_mharrington/teffh8jt/1/
If you need any further assistance with this, please let me know.
great thank you.
as i wanted to fix this issue in every part of our application we added this to the shared BLOCKED SCRIPT
$(function() {
$(document).delegate(".combo", "igcombodropdownclosing", function (evt, ui) {
$(".combo").igCombo("filter", null, "");
});
in case we have multiple combos in the page everyone will be filtered.
do you know a way from ui, to get the correponding "select" ?
i tried : ui.owner.bindings.filter("select");
or ui.owner.mainElem.find("select")
but it is not working.
thank you
G.
sorry for posting again,
but i have a problem with that solution..
every time i select something, the .igCombo("filter", null, ""); command resets also the selection.
so i'm unable ot select anything.
there is a way to keep the selection if made ?
For your first post, you can get the element of the igCombo that triggered the event with the "ui.owner.element" argument. This is common across most of our controls and events.
For your follow up post, you can work around this by grabbing the selected values in the igCombo before calling the filter method and then restoring them after calling filter. Since you are using multiselection, this can be done with the values method.
I have made these modifications and updated the jsFiddle here:
http://jsfiddle.net/ig_mharrington/teffh8jt/2/
If you still need help with this, please let me know.
By NrgJack in igCombo
thank you very much
that's exactly what i needed
Best regards