F
Filament5mo ago
bald

Table's Query Builder is not shown shown in full width

I have a resource, which has a table, and I added filter inside using the QueryBuilder, as follows:
// ...
->filters([
Tables\Filters\QueryBuilder::make()
->constraints([
Constraints\DateConstraint::make('start_date'),
Constraints\DateConstraint::make('end_date'),
]),
])
// ...
->filters([
Tables\Filters\QueryBuilder::make()
->constraints([
Constraints\DateConstraint::make('start_date'),
Constraints\DateConstraint::make('end_date'),
]),
])
The filter works. However the UI does not render correctly. As shown in the image, the DateConstraint of "start_date" is rendered as (I think) 3 columns while it actually only need 2. Of course the same thing happens for the "end_date" constraint. I've tried to change the filter layout to Modal, Above Contenct, etc; but it all the same. Any ideas of what's wrong here?
No description
3 Replies
saineshmamgain
saineshmamgain20h ago
@bald I have the same issue. Were you able to fix this?
Alnuaimi
Alnuaimi18h ago
use columnspanfull()
charlie
charlie15h ago
try
// ...
->filters([
Tables\Filters\QueryBuilder::make()
->constraints([
Constraints\DateConstraint::make('start_date'),
Constraints\DateConstraint::make('end_date'),
])->columns(2),
])
// ...
->filters([
Tables\Filters\QueryBuilder::make()
->constraints([
Constraints\DateConstraint::make('start_date'),
Constraints\DateConstraint::make('end_date'),
])->columns(2),
])
(maybe...)

Did you find this page helpful?