Hello,
How would I go about selecting rows based after a user clicks the checkbox provided when setting rowSelectable="true"?
The documentation says to use handleRowSelection but that event doesn't appear to fire when rowSelectable="true" only when it is false or omitted.
I want to use rowSelectable because the experience provided with the checkbox is user friendly but I have a case where I need to select rows that are similar to the row selected by the user. The logic to identify the other rows is trivial, so I'm not referencing it. All I need is a way to fire a method after the checkbox is clicked.
I see that onRowSelectionChanged fires but unfortunately I'm selecting other rows so when I do that it just fires onRowSelectionChanged again which leads to an infinite loop.
Please help.
Thanks!
Thank you for contacting us!
You can use the newSelection property of the emitted value onRowSelectionChange event to apply you logic.
Here is a StackBlitz sample for your reference.
Please, let me know if you have any questions.
Best Regards,
Hristo Popov
Thanks for the help! This solved my problem.