Filters layout not appearing properly above content
I have the following filters
However they appear as a column, and not like this
72 Replies
Hey, I know. That where I took the image from π
. Thats the problem, it doesnt work
It appears like this
ah ok π
->filtersFormColumns(3)
in the same doc page πHey . That still doesnt work. I also tried it π
. It only makes the columns wider, like this:
This is very weird. I dont have any custom css or anything
Do you think it could be a bug?
I think each form is a standalone filter
so not sure how to make one filter to disply as colimns
maybe wrap it into grid
You mean, like this?
Method Filament\Tables\Columns\Layout\Grid::getName does not exist.
Grid::make()
Its the same error
I literally copied the code from a resource I have π weird
brooo π€£ π€£
noo
all gose in
form
Legend πͺ. Thank you!
Mind if I ask one more question?
sure
Wait a sec, if I keep adding components, the UI gets messed up again
I want to keep adding components, and they are all added in a line
->columns(5) ?
and do you need them all in one filter?
Doubt xd
I want all these filters in the header of the table
(AboveLayout)
I mean you can make multiple filters
and they still all AboveLayout
try removing
->filtersFormColumns(5)
only use
form()
if you want to like group filters with one query
if i making sense π
Yehh, I understand, for each Filter a different ->query()
I had everythign grouped in v2 and it worked well, but things changed haha
What if I want to use the queries in conjuction?
ya in this case one filter with one form π
Yeah, but then the problem is they appear as a column π€£
Ive been working on this for too long
removing
->filtersFormColumns(5)
didnt help?
so you have to get how Grid works
it's responsive div with tailwindcss classes
its gonna be tricky
YESS. I figured it out
Its hard to explain whats going on, but I think I get it
One more thing. I have some resources with names "status", "definitions", etc. But when I set them to collapsed from the panel, it doesnt seem to work?
the collapsed stored in the local storage, so if you make some changes you need toclear that to see the effect
Can you elaborate?
Basically what I want to do, is have that group collapsed by default when loading the page
when loading the page the first time, filament will store which nav group is collapsed in local storage
so if you made any changes like adding
->collapsed()
you need to clear that dataSo you cant have it always load collapsed?
no you can
for new users will appers collapsed
but for your browser... clear the local storage data
then refresh
okk lemme try
local storage
right clikc and delete just in case
after reshresh it will populate again with the new values
oh bruh, it works now. Thank you @Lara Zeus !
you're welcome π
But there isnt a way to delete the users value from his storage, right?
is that illegal?
Or in other words, force him to always open the page with collapsed groups
not sure actually, you could write some js code to check if there is any stored data and handle that
but dosnt make sense since the user still can open and close these groups and it will sotre again in the storage
Hey sorry again. But it seems the Filters appear broken on screen with different sizes:(
For example like this on 1080p screens.
Even if I pull my dev tools, it breaks!
If you have time, I would appreciate it if you could help again:)
I dont think this can be fixed π
grid is 12 columns so do the math, I dont think 1 column per filter will be fit for the field
so you have to rethink the UI again with this many filters
maybe use modal or slideover?
one thing you can try
columns(['md' => .....])
and play aroundHey thanks for your reply. However, I still couldnt get it to work π¦
I will ask Dan and hope he doesnt yell at me π€£
You just put too many filters in one line π€
Nahhh
It worked perfectly fine in v2
When migrating to v3, then the Filter component, became a single column dropdown you can activate by pressing the Filter button
Now I have created a Grid, but its overly complicated.
I want it to work on all screens
@Dennis Koch I just need the code for this: https://filamentphp.com/docs/3.x/tables/filters/layout#displaying-filters-above-the-table-content
In the schema
How did Dan do it?
Im afraid that still doesnt work. It keeps breaking the UI
I would appreciate it if you could have a look
https://pastebin.com/sse351ZN
Maybe im doing somethign wrong and just not seeing it
Uhhhhhh wait hold up. If I remove all the callables, then it works????
wth
I found the issue! @Dennis Koch Its the
->multiple()
callback. Thats what causing the issue.multiple
Single
Is this intentional? Im guessing it isnt
But they are both part of the class="choices". SO how are they different? π€
I doubt it's intentional, but I also have no idea π
Ok then. Time to debug π€
For the past 2 hours Ive been trying to find the damn blade file but I cant. Do you have any idea how I can find it?
As you can see, the div has custom styling via style=""
I think it's
vendor/filament/forms/resources/views/components/select.blade.php
Its overriding my theme classes
1s i will check
https://pastebin.com/12q5mB9J
Just target it with css and set min-width to 100%
target it? I did it via theme. and it doesnt work:/
Also this is generally a bug, and I want to submit a PR
This file doesnt have any style
min-width: 100% !important;
And if itβs a bug itβs a bug in choices.js not filament.
UI bug from javascript?
Even though the bug is iun frontend?
Would have to dig further. Anyway, min-width: 100% !important; works. Iβm using it in the table repeater plugin to solve this exact issue.
Ahh okk. Did you inject via a theme?
Itβs in the pluginβs css file.
Btw i used
This also works
So it would work in a theme too
Hm. What is the class name?
I just did .choices input {}
I did
.choices__input .choices__input--cloned
but it didnt work. I will try yours
Thanks. That worked!