deadbeef
deadbeef
FFilament
Created by deadbeef on 11/6/2024 in #❓┊help
Export Action - Custom File Path
Is there a way to specify a custom export file path without overriding a bunch of classes?
2 replies
FFilament
Created by deadbeef on 10/15/2024 in #❓┊help
Repeater - Safe Approach to Prepend Data
I can't seem to find a path with the Repeater component to safely add a new item to the start of the list. I have the two following approaches:
// Use internal Filament events to add the new item and move it to the start of the list
public function addFormItem() {
$this->mountFormComponentAction('data.criteria', 'add');
$ids = array_keys($this->data['criteria']);
$newItemId = array_pop($ids);
$ids = [$newItemId, ...$ids];
$this->mountFormComponentAction('data.criteria', 'reorder', [
'items' => $ids
]);
}
// Use internal Filament events to add the new item and move it to the start of the list
public function addFormItem() {
$this->mountFormComponentAction('data.criteria', 'add');
$ids = array_keys($this->data['criteria']);
$newItemId = array_pop($ids);
$ids = [$newItemId, ...$ids];
$this->mountFormComponentAction('data.criteria', 'reorder', [
'items' => $ids
]);
}
// Manually add to the state
public function addFormItem()
{
$newItem = [str()->ulid()->toRfc4122() => ['new-repeater' => 'contents-here']];

$this->data['criteria'] = $newItem + $this->data['criteria'];
}
// Manually add to the state
public function addFormItem()
{
$newItem = [str()->ulid()->toRfc4122() => ['new-repeater' => 'contents-here']];

$this->data['criteria'] = $newItem + $this->data['criteria'];
}
The new item shows up, but they seem to break repeater collapsing functionality. Is there a better way to handle this?
1 replies
FFilament
Created by deadbeef on 5/30/2024 in #❓┊help
Is there a way to hook an alpine event when a table loads new results?
I need to hook an alpine event whenever a table loads new results. Is there a way I can do this?
8 replies
FFilament
Created by deadbeef on 4/5/2024 in #❓┊help
Execute code when action modal is being closed
I'm looking to accomplish the inverse of https://filamentphp.com/docs/3.x/actions/modals#executing-code-when-the-modal-opens , is there a method I can hook into to accomplish this?
1 replies
FFilament
Created by deadbeef on 3/18/2024 in #❓┊help
Match one of X validation rules on field
I would like to have a TextInput for a hostname that can either be ->activeUrl() or ->ip(), is there a way I could make sure one of those validation rules match?
4 replies
FFilament
Created by deadbeef on 3/11/2024 in #❓┊help
Is there a way I can put an infolist inside of a wizard modal?
I would like to add an infolist for the user to confirm the details of their action inside of a wizard modal. It looks like the wizard only takes form items, but I'm guessing there has to be a way to do it?
3 replies
FFilament
Created by deadbeef on 2/27/2024 in #❓┊help
Is there a way to pass a query builder into searchable select to populate options?
I'm new to filament, it seems like there would be a way to pass in a custom query builder into a select component instead of being dependent on a relationship set up on a model. Is there a way to do this instead of having to fetch all of the options in advance?
8 replies