Welcome to the JavaScript feedback portal. We’re happy you’re here! If you have feedback on how to improve the JavaScript, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

The documentation says:

Through programmatic you can set null value to anyone of the index, text or value property to clear the selected item in DropDownList.

However none of those properties have null included in their type definitions, e.g. value is declared as:

    public value: number | string | boolean;

This means if I try to set any of those properties to null in typescript code my IDE flags it up as e.g.:

Type 'null' is not assignable to type 'string | number | boolean'.ts(2322)

(property) DropDownList.value: string | number | boolean

I can work around it by casting my object to any, but I think those properties should be declared as accepting null as well, so e.g. for value it would be:

    public value: number | string | boolean | null;