With the new support for Oracle JET 9 in Oracle Visual Builder, it's much simpler to create a multi-row selection enabled table that with checkboxes for row selection. Below is a quick video showing how this is done. This is much simpler compared to the approach you had to take before.
The table automatically adds a selection checkbox column when you set the selection-mode.row="multiple" attribute. There is an on-selected-changed event on the table - and you can attach an action chain to it. The event gets an array of the selected row keys as an input parameter. In the video, I'm simply looping over this array and show a notification with the row key referring to them with the expression - [[ $variables.keys[$current.index] ]]. You can of course use this array for any follow up steps you want to do on the rows.
Note that this will only work if your app is using the Redwood theme (the default for new apps in VB). If your app is still using an Alta based theme you won't see the checkboxes, you'll need to switch your app to Redwood to get them.
I have an off-topic question.. What is the possibilities of adding node_modules to visual builder? Example , i need to use react. I will i go about adding react to my project..
thanks
VB is a client side tool - so you can add HTML Web components into it, and you can add REST sources of data on the back.
I'm not exactly clear on what you are aiming to do with React in that case - I would suggest posting your question on our forum with more info on your use case - https://cloudcustomerconnect.oracle.com/resources/e610f4723c/summary
I'm trying to reset selection after an action (e.g. delete row) on selected rows. Is there any trick for this ?
In general you can bind a variable to the selected property of the table and then reset it to clear the selected rows.