F
Filamentβ€’13mo ago
pocket.racer

how to display sort selections with Table ViewColumn?

I have a piece of code like this
->columns([
Split::make([
TextColumn::make('amount')
->sortable()
->hidden(),

TextColumn::make('discount')->sortable()->hidden(),
]),

View::make('complicated-view to display multiple things in a very custom manner'),
])
->columns([
Split::make([
TextColumn::make('amount')
->sortable()
->hidden(),

TextColumn::make('discount')->sortable()->hidden(),
]),

View::make('complicated-view to display multiple things in a very custom manner'),
])
However i didn't get the amount and discount sort to appear This is what i had in mind (which didn't happen). I tried to use the Split to get the Sort by thing to show but it didn't too
No description
8 Replies
pocket.racer
pocket.racerOPβ€’13mo ago
bump
Dennis Koch
Dennis Kochβ€’13mo ago
Well, it didn't because it's hidden πŸ˜…
pocket.racer
pocket.racerOPβ€’13mo ago
but i want to sort by it every item is display through the View::make() where i display each item in a more customised manner inside a blade view (which contains the date, amount, title.etc) but i still want the ability to sort by date, amount, title.etc
Dennis Koch
Dennis Kochβ€’13mo ago
Sorry, I don't know how to make that work. You probably need to overwrite the logic for the available columns on sort and search
pocket.racer
pocket.racerOPβ€’13mo ago
how do i do so? earlier i tried this but didn't work in my attempt to add amount and discount as sort options
->columns([
Split::make([
TextColumn::make('amount')
->sortable()
->hidden(),

TextColumn::make('discount')->sortable()->hidden(),
]),

View::make('complicated-view to display multiple things in a very custom manner thanks to some designer unfortunately'),
])
->columns([
Split::make([
TextColumn::make('amount')
->sortable()
->hidden(),

TextColumn::make('discount')->sortable()->hidden(),
]),

View::make('complicated-view to display multiple things in a very custom manner thanks to some designer unfortunately'),
])
Dennis Koch
Dennis Kochβ€’13mo ago
Well, I just said, that I don't know how to do that πŸ˜… And you just shared the same code example again.
pocket.racer
pocket.racerOPβ€’13mo ago
i mean this, u said this below. i ask how do i do so?
You probably need to overwrite the logic for the available columns on sort and search
Dennis Koch
Dennis Kochβ€’13mo ago
You need to source dive the code and see whether you can change it at some point. I don't have exaact instructions.,
Want results from more Discord servers?
Add your server