How to fetch current table records in table query
I am building a dynamic table, where I would like to use a list of the current records in the table I have queried. Here is a code snippet of the table I am building:
In my
->afterStateUpdated
I would like to fetch and use the the query of all records in the table, without needing to run the query again:
Because my query could change based on filters in the future, so the easiest would be to fetch the records from the table dirctly.1 Reply
I found a workaround for now. Since the table queries will only list the same record once, I can deduct the queried records from the details of the updated record, like so:
And then in
OrderService::handleRouteChange()
:
But I would still love to know it it is possible to get the query directly from the filament table in afterStateUpdated
.