Unplanned
Last Updated: 09 Jun 2020 14:05 by ADMIN
Justin
Created on: 17 Apr 2018 18:13
Category: DropDownList
Type: Feature Request
8
Clear Button or Make ValueSubject public
It would be good to have an option for clear "X" or whatever on the DropDownList. This is already on the ComboBox but not on the DropDownList. I can see the argument that having a blank option as the first option in the popover would work but that requires the user to open the popover and click a blank entry and forces all lists to have a blank item. 

I'm currently getting around this by wrapping the kendo component in my own component and using css to put a clear button on the kendo control. However, there is no public access to the needed functions to clear the control and have the angular zone update when in an on push state (Not sure about normal change detection strategy but I only use on push so...). Right now I have to cast the component to type any and then use the private functions on the component. See below. Access to either the proper method to do what I'm doing or adding a native clear would be really great. Really for all controls. I would be happy with just the access to the proper functions as it allows me to customize when and how the clear shows. 

this is what I'm doing for now that gets what I want. 

        this.dropDownList.reset();
        const dropdown = this.dropDownList as any;
        dropdown.valueSubject.next(undefined);
0 comments