Buttons Collection
The ButtonGroup enables you to render multiple Button components by iterating a collection of configuration objects.
The following example demonstrates how to render a collection of buttons. It utilizes the selectedChange
event of each button which executes custom logic when the button state is changed.
Storing Selected Buttons
When you implement a collection of Buttons within the ButtonGroup, you can track the selected buttons by storing that selection in a custom collection.
To enable this behavior:
- Set the selection mode of the ButtonGroup to
multiple
. - Handle the
selectedChange
event of each button to update the collection.