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
15
How to clear the selection of a IgxDropDownComponent?
posted

Hi.


I would like to clear a Dropdown selection.

The "setSelectedItem" function of IgxDropDownComponent only accepts values between the Ids of the Dropdown Items list (https://github.com/IgniteUI/igniteui-angular/blob/b74de693f1/projects/igniteui-angular/src/lib/drop-down/drop-down.component.ts#L265).. As such, setting the value to "-1" or "undefined" / "null" has no effect.

Shouldn't there be a more elegant solution instead of calling ngOnDestroy() on the component for something as simple as clearing a selection?

Thank you for your time.


Regards,
Cornel Stoica

Parents
  • 1320
    Offline posted

    Hello Cornel,

    After investigating this further, what I can suggest is creating an issue in our GitHub repository here. This will give you the opportunity to communicate directly with our developers and get notifications when new information regarding your issue is available.

    When creating your issue be sure to be specific and provide as much details as possible. Attaching a working sample, screenshots and any information that consider relevant are going to be very helpful.

    Please let me know if you need more information.

    Regards,

    Monika Kirkova,

    Infragistics

Reply Children