What is the event that should be used to react to a click event for a toggleable button. OnClick does not work and there does no appear to be a toggle event like JQuery or selectedChange event for Angular.
3 Answers, 1 is accepted
0
Stefan
Telerik team
answered on 17 Jan 2019, 08:43 AM
Hello, James,
The button with the toggleable set to true will fire the click event, but this will not provide information for the current state of the button.
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Your solution does work but I should have been more specific on what doesn't work with the onClick. We are actually using the button in the grid toolbar and when we click the button we are actually filtering the data in the grid which causes a render and thus apparently the button renders and loses it's state.
0
Stefan
Telerik team
answered on 18 Jan 2019, 08:58 AM
Hello, James,
Thank you for the clarification.
I added this to the issue as currently, we add the active state on click, but it is not kept internally in the component state.
For a workaround, this information can be kept in the component that uses the Button and dynamically adds the active state class:
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items