Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
45
Clearing the current selection of a combobox doesn't seem to be working
posted

Hello.

I'm trying to clear the selection of a combo programatically after selecting a few items. What I'm trying to achieve can be seen on the following codepen: http://codepen.io/anon/pen/dOrEXe . However I'm having trouble because  $("#combo").igCombo("index", -1); and $("#combo").igCombo("activeIndex", -1); aren't resetting the combo's selection.

Any help with this matter would be greatly appreciated.

Thank you for your time.

Parents
  • 2095
    posted

    Hello João Pinto,

    Thank you for posting in our community!

    I would like to provide you a link to our combo API and especially to documentation for initialSelectedItems - 

    http://www.igniteui.com/help/api/2016.2/ui.igCombo#options:initialSelectedItems, which is closely related to the case. It says: " If initialSelectedItems are not set, the combo is with single selection and it is in a dropdown, readonly or readonlylist mode, the first item will be automatically selected."

    This is what happens in your scenario. If you remove the set mode, then the combo will behave as you expect.

Reply Children