Recommendation on strategy
Hi all, I have a Page with a table and a widget on the Page in the header. I want to do some calculations with the currently selected rows of the table but am unsure what the best way to connect the widget to the table could be. Any suggestions?
2 Replies
Look up
$get $set and ->afterStateUpdated from the docs
You can access
$selectedTableRecords
on the ListPage, but they are not live so I guess you need to add a button which then dispatches an event to your widget component and updates the data.
There is a ExposesTableToWidgets
trait, but it doesn't include the selected records as they aren't live.