Help with passing tableFilter in url - SOLVED
I have a table filter I am trying to access via the url which I am struggling to use. I want to pass a string or numeric value to it.
The filter is called searchStoreProduct and the value I am trying to pass in the below example is 80652. Cany any one help me build the final query string? below is where I have got so far.
?tableFilters[searchStoreProduct][value]=80652&tableFilters[searchStoreProduct][isActive]=1
6 Replies
Check the URL when you're using filter. copy it. Works great!
When I'm using the filter the url remains unchanged on this particular page
That's odd. What' browser you are using? Is the filter working fine without any change in URL?
Did you also try inspecting the network request?
ill try inspecting the network
did find this in the request data though
looking at the request data i thought this would work but again no joy
?tableFilters[searchStoreProduct][searchStoreProduct][value]=80652&tableFilters[searchStoreProduct][searchStoreProduct][isActive]=1
For anyone else struggling with this - the issue was I was using a custom page with the table filter included. Onces I added
protected $queryString = [
'isTableReordering' => ['except' => false],
'tableFilters',
'tableSortColumn' => ['except' => ''],
'tableSortDirection' => ['except' => ''],
'tableSearchQuery' => ['except' => ''],
];
to the custom page class. the url reflected the filters on the page so I can use that as that to correct the url which resulted in being - ?tableFilters[searchStoreProduct][searchStoreProduct]=8562
Thank you for your help