11 Replies
Please see
https://discord.com/channels/883083792112300104/1167015843020943390
Section, how to write good question.
Because what are you doing, what is the code?
I really need to explain whats a table Tab ? π
I think they use it in the demo and persist it to the url
source code is on github
Yes its in the URL by default but I try to find a method like getActiveTab() or something like that for doing condition on my Resource
Like for example, hidding the delete bulkaction when in the 'archived' tab
hm
put it in the session when the
getTabs
method is called and base your visbility on that?
just a thought.. not sure if possibleHmmn, not sure to understand π¬
so for the tabs, you define a query https://github.com/filamentphp/demo/blob/678ef5c53f219a2032c0ae70fd5b5e7d3cfeb9b5/app/Filament/Resources/Shop/OrderResource/Pages/ListOrders.php#L31
not sure if you can make it a callback and make it it also persists what tab is active in the session
then you could create your
getActiveTab
function yourself and base the visbility of your bulkaction on it
and worth trying the default
https://www.php.net/manual/en/reserved.variables.get.php
$_GET['activeTab']
don't work sadly π¦something like this?
After some little modification for my need it worked π
Thanks for your help
And I found a bug with tabs and bulkActions π
When you switch between actions the selection state is not cleared and its mess with the bulk actions you see even on the right tab ^^
Oh yes, sorry my bad.
not sure how to update this between the states
if we do something like this on the ListRecords page
not sure how to access activetab in the Resource class.