Martin Lakrids
Martin Lakrids
FFilament
Created by Martin Lakrids on 7/2/2024 in #❓┊help
Refresh hint visibility after $set()
Unfortunately, I still cannot fix this error by myself. I have thought about, maybe there is some possibility to call "refresh!" on the Livewire component (the TextInput) inside the hintAction or something else. Any suggestions?
5 replies
FFilament
Created by Martin Lakrids on 6/17/2024 in #❓┊help
TextInput get disabled state in placeholder callback?
I suppose i somehow can inject the "current field" like i could inject an instance of the entire livewire form component, however i just want to inject the current input
4 replies
FFilament
Created by Martin Lakrids on 6/12/2024 in #❓┊help
Add Relation Manager to EditTenantProfile
No description
4 replies
FFilament
Created by Martin Lakrids on 5/1/2024 in #❓┊help
Filter/scope table data based on a PHP function, not using QueryBuilder based on values in database
Tally that doesn't seem to be a valid use case, since the data is really in a database, but they just need to be filtered "in between" getting selected from the database and being provided to the table
11 replies
FFilament
Created by Martin Lakrids on 5/1/2024 in #❓┊help
Filter/scope table data based on a PHP function, not using QueryBuilder based on values in database
toeknee, thanks for answering. Is there no way currently to implement some kind of filter between the Database and the table?
11 replies
FFilament
Created by Martin Lakrids on 4/18/2024 in #❓┊help
Table with a modal action that should contain a custom table-like form, is that even possible?
I have solved this an entire different and more simple way. Using just a regular Action with a form, and adding a Repeater field containing the fields of each related item. Then, in the action, using fillForm() to add the related models such that they are filled when opening the modal. Finally, receiving and handling the data is also done using the default Action. End result is something like this (NB, using TableRepeater plugin https://filamentphp.com/plugins/awcodes-table-repeater):
Action::make('editUser')
->fillForm(fn ($record): array => [
'familyMembers' => $record->getFamilyMembersArray(),
])
->form([
TableRepeater::make('familyMembers')
->headers([
...
])
->schema([
Checkbox::make('active')->default(false),
Placeholder::make('name')->content(fn ($state) => $state)->hiddenLabel(),
TextInput::make('note'),
])
->columnSpan('full')
->addable(false)
->reorderable(false)
->deletable(false),


])
->action(function (array $data, $record): void {
info('Got data', [$record, $data]);
})
Action::make('editUser')
->fillForm(fn ($record): array => [
'familyMembers' => $record->getFamilyMembersArray(),
])
->form([
TableRepeater::make('familyMembers')
->headers([
...
])
->schema([
Checkbox::make('active')->default(false),
Placeholder::make('name')->content(fn ($state) => $state)->hiddenLabel(),
TextInput::make('note'),
])
->columnSpan('full')
->addable(false)
->reorderable(false)
->deletable(false),


])
->action(function (array $data, $record): void {
info('Got data', [$record, $data]);
})
3 replies