Replies: 1 comment
-
Oh... I think I understand half my question now. For the Toolbar.Button, the piece I was missing was If I add |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
While using the Toolbar component, I'd like to handle Toolbar.GroupItem and Toolbar.Button click's directly instead of having to jump through hoops while using onValueChanged or binding to value. However when I delegate rendering in the GroupItem or Button, I no longer get keyboard events being handled.
E.g. This example will allow me to handle on:click but I lose the ability to cycle through the toolbar items using the left and right arrow keys.
Side note: It would be much much nicer if the Toolbar allowed overidding on:click handlers directly instead of using render delegation. Without this, the only 2 options are to use render delegation like I'm doing above, but that breaks most of the toolbar's keyboard functionality. Or, write complex code to handle toolbar item clicks via the GroupItem's onValueChanged callback. This last option is ok if type="single", but for type="multiple", it becomes difficult.
Also, how do you handle clicks for Toolbar.Button?
Beta Was this translation helpful? Give feedback.
All reactions