Feature Request: Add method to get filtered table query without tab modifications #15338
Replies: 2 comments 2 replies
-
you could add a new relation to the model depending on your scope
this returns a valid hasMany relationship which is not limited to anything other than the base relationship |
Beta Was this translation helpful? Give feedback.
-
ListRecord: Model with invoices as relation: public function paidInvoices(): HasMany |
Beta Was this translation helpful? Give feedback.
-
Description
Currently, when implementing tab badge counts in List pages, we can either:
getFilteredTableQuery()
which includes the current tab's query modificationsThis makes it challenging to display accurate badge counts that respect the current table filters while ignoring tab-specific query modifications.
A new method like
getFilteredTableQueryWithoutTabModifications()
would solve this by returning the filtered query state without applying the active tab's modifications.Example use case:
This would ensure badge counts accurately reflect active filters while maintaining consistent counts across tab switches. This is usually an issue if you have 2 or more tabs with badge counts.
The current workaround involves temporarily nullifying the active tab to get the base filtered query, which causes UI lag due to reactive updates:
Beta Was this translation helpful? Give feedback.
All reactions