ComboBox with no automatically selected item at init

Posted by: cosmin-cazac on 14 September 2017, 3:10 am EST

    • Post Options:
    • Link

    Posted 14 September 2017, 3:10 am EST

    Hello,

     How can I set up the combobox to not select any item at all when it's initialized? I tried setting the selectedIndex=-1 but it didn't worked. Also tried to set the selectedItem = null and put isRequired to false, but still no results. I`m using Angular 2.
    

    Thanks,

    Cosmin

  • Posted 14 September 2017, 3:10 am EST

    Hello Cosmin,

    Please set currentItem to null of CollectionView instance. Please use the following code snippet for the same:

    // this.data=> CollectionView instance
    this.data.currentItem=null;
    

    Thanks,

    Manish Kumar Gupta

  • Posted 30 January 2018, 2:35 am EST

    Hello team,

    I recently upgraded wijmo for our AngularJS application from version 5.20161.154 to 5.20172.334.

    After this i see that all the wijmo dropdowns throughout the application that were earlier initializing with no default values selected are now appearing with the first item in dropdown selected by default.

    I see there is a solution provide above but i do not want to go into each and every controller and set this code for each dropdown in the whole app. Is there a generic way to do this since it was working as desired with older version. Not sure what changed with the upgrade in order to change this behavior.

    thanks,

    Liju

  • Posted 1 February 2018, 8:48 pm EST

    Hi Liju,

    You may bind all the ComboBox with collectionView. And set teh CurrentItem to null. Please refer to the following fiddle for the same:

    http://jsfiddle.net/rxaak27r/20/

    ~Manish

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels