Entangle table selectedRecords?
Is there a way of making a table's selectedRecords entangleable? I really do not want to overwrite the big tables/index file when I only need to change one line in it.
The use case is where I'm using a table as a selection, so need a way of preselecting the selectedRecords.
8 Replies
I would avoid entangling, it will really slow the page down when you select lots of records. Thats why we dont use it
Ok but how do you get the selectedRecords without it?
E.g I've got a button below a table.
Bulk actions are too hidden away and the primary use of this table is to select records.
I've got this to enable the selection without bulk actions
Can you example what you are trying to do?
Use a table checkboxes for selecting many records.
Here it opens a modal with the ability to sort/filter/etc.
When you click 'Select Animals' button at the bottom I need the
selectedRecords
but this is outside of the table component.Yeah that's a bit tricky and I'm not sure how to handle it. I know LW3 is allowing passing data to parents so what could be handy in that scenario.
Awesome can't wait to get stuck into v3 just holding off it for now till they've released it.
As a work around for now I've ended up overwriting the bulk action dropdown
Now to see if there's an easy of way of making the row on click toggle the checkbox.