KarlisJ
Query only toggled/displayed columns
I have a table with 100+ columns and for performance reasons the table displays only limited amount of them using
toggleable(
. However, all columns are selected from DB.
First I thought that it's a bug, why wouldn't Filament select only the columns that are defined on table but then realised that developer can set state using full record.
So I'm looking for a way to manually set the query with select(
but for that I need to access toggled columns. Is there a way to do that?15 replies
Free text radio option
As a simple example, a radio field "Your favorite color?" with values
red
, green
, and other (please specify)
and when other is chosen input is shown that allows entering any value.
I think this is quite common behaviour in web forms but struggle to find a good solution. I can have text input depending on radio and display it only when
other` is selected but:
1 . The UI feels off, since they are separated out
2. I can't set the value of radio from input since it has fixed allowed values, so I have to create a third hidden field.
Has someone created this setup?6 replies
Saving form as draft and validate all except `required`
I have a couple of long forms that I'd like to save as a draft after a field is blurred. Most fields have some specific validation, and due to technical constraints, that validation is crucial (there's no other validation before putting in DB) . Most of the fields are marked as
->required()
.
How can I achieve this?
1. What's the best way to update the draft on every change in any of fields?
2. How can I apply all validation rules except ->required()
when updating draft? (The effect here would be that we're also giving instant feedback is field is not valid)
Note, that I'm using the form in a custom Page inside the panel.5 replies
Open action modal from dropdown item
I'm probably making some silly mistake but I can't figure out how to open action modal from dropdown list blade component https://filamentphp.com/docs/3.x/support/blade-components/dropdown
The example shows
But what exactly is
openDeleteModal
supposed to return?15 replies