slamx_
slamx_
FFilament
Created by slamx_ on 6/9/2024 in #❓┊help
Change active Tab via callback
Is it possible to change the Tab by dynamic value? I want to use Icons on the front-end to open a form inside a modal and want to show the selected Tab? Maybe something like: $this->form->getComponent('tabCompName')->activeTab(3)
4 replies
FFilament
Created by slamx_ on 6/2/2024 in #❓┊help
Move Searchbar to Sidebar
Is it possible to add the searchbar on top of the Sidebar? The reason for this move is, that we add a notification tool inside the Topbar and on mobile there is not enough space for both, searchbar and notification badge.
6 replies
FFilament
Created by slamx_ on 6/2/2024 in #❓┊help
Setup Section width
Is it possible to setup a width for the first Section inside the Split View Component?
7 replies
FFilament
Created by slamx_ on 5/30/2024 in #❓┊help
live() not working inside Tabs
If I use live for a select and the Get on hidden for a text input, I have the problem that this does not work within a tab form, but it does work outside.
3 replies
FFilament
Created by slamx_ on 5/27/2024 in #❓┊help
False/Null value not inside getState
In v2 the Form State of a toggle send also a false/null state inside the getState() function. In v3 they don't - is it possible to change inside the global form component settings? The Form field is disabled based on a condition.
4 replies
FFilament
Created by slamx_ on 5/27/2024 in #❓┊help
Add class to Layout Grid
Is it possible to add a class to the Grid Layout Component?
9 replies
FFilament
Created by slamx_ on 5/24/2024 in #❓┊help
How to call function inside custom form field
I'm new in writing a custom form field. I watched the laracast from Dan but I want to trigger some custom functions inside the Field Class. I tried a regular wire:click with naming the method but I get the following response: Unable to call component method. Public method [$example] not found on component This is my example form field: namespace App\Forms\Components; use Filament\Forms\Components\Field; class CloudFileSelect extends Field { protected string $view = 'forms.components.cloud-file-select'; public function example() { dd('example'); } } And this is the view: <x-dynamic-component :component="$getFieldWrapperView()" :field="$field" > <div class="z-10" x-data="{ state: $wire.$entangle('{{ $getStatePath() }}') }"> <button class="button hover:cursor-pointer" type="button" wire:click="example()">Open Example</button> </div> </x-dynamic-component> I would be happy if someone can help me or give me a good source with a comprehensive example for writing my own field.
60 replies
FFilament
Created by slamx_ on 5/24/2024 in #❓┊help
Fileupload Bug view
No description
4 replies
FFilament
Created by slamx_ on 5/23/2024 in #❓┊help
extraFieldWrapperAttributes does not exist
Hey I'm a bit confused, I try to use extraFieldWrapperAttributes on a TextInput like in the docs: https://filamentphp.com/docs/3.x/forms/fields/getting-started#adding-extra-html-attributes But I get the response: Method Filament\Forms\Components\TextInput::extraFieldWrapperAttributes does not exist.
5 replies
FFilament
Created by slamx_ on 5/23/2024 in #❓┊help
Custom Listeners in v3
I want to create a dispatch inside a Form Field Action (like repeater::createItem), but how I can access the livewire instance like here in v2? $livewire->emit('newRepeaterItemID', $newUuid); I tried it via component, but it didn't work. $component->dispatch('newRepeaterItemID', $newUuid); Any Ideas how convert this v2 into v3? Maybe I'm on the wrong path 🙏 Here is a v2 Code-Snippet: $this->registerListeners([ 'repeater::createItem' => [ function (Repeater $component, string $statePath): void { if ($statePath !== $component->getStatePath()) { return; } $newUuid = (string) Str::uuid(); $livewire = $component->getLivewire(); data_set($livewire, "{$statePath}.{$newUuid}", []); $component->getChildComponentContainers()[$newUuid]->fill(); $component->collapsed(false, shouldMakeComponentCollapsible: false); $livewire->emit('newRepeaterItemID', $newUuid); $livewire->emit('newRepeaterItem', $statePath); }, ],
2 replies
FFilament
Created by slamx_ on 5/16/2024 in #❓┊help
Exclude from live()
Is it possible to exclude single form items from Form reload when using ->live()?
2 replies
FFilament
Created by slamx_ on 5/16/2024 in #❓┊help
Fileupload - Error divison by zero
I use the following code for fileupload customization, but when I use Livewire\Features\SupportFileUploads\TemporaryUploadedFile I get a "divison by zero" error. FileUpload::make('avatar') ->label('Avatar Upload') ->disk('s3') ->image() ->visibility('private') ->maxSize(1024) ->preserveFilenames() ->imageResizeTargetHeight(600) ->getUploadedFileNameForStorageUsing(function (TemporaryUploadedFile $file): string { // store new file $oriName = $file->getClientOriginalName(); $storeName = $file->getFilename(); $this->userAvatar = [ 'user_id' => auth()->ufile()->id, 'file_name' => $oriName, 'file_path' => auth()->ufile()->filePath() . '/' . $storeName, 'is_public' => false, 'categories' => ['Avatar'], 'upload' => ['Avatar'], ]; return (string) str($file->getFilename()); }) ->directory(auth()->ufile()->filePath()),
3 replies
FFilament
Created by slamx_ on 4/11/2024 in #❓┊help
IconColumn display error v3
No description
17 replies
FFilament
Created by slamx_ on 4/10/2024 in #❓┊help
use getFormSchema in v3
One question, because unfortunately it is not really clear from the documentation - is getFormSchema() now outdated or can it still be used after an update? It would be great if other notes were also listed in the upgrade overview (e.g. changes such as modal labels modalSubmitActionLabel etc.).
3 replies
FFilament
Created by slamx_ on 3/22/2024 in #❓┊help
Select disabled not working
When I use the following code, the disabled only worked not with multiple(). Any tips to fix this? Select::make('users') ->label(__('Users')) ->multiple() ->reactive() ->afterStateUpdated(function (Closure $set, $state) { $set('user_group', null); $set('select_all', false); }) ->required() ->disabled(function(Closure $get){ $multi = $get('multi_user'); if($multi){ if($this->userAllEdit){ return false; } else { return true; } } else { return false; } }) ->options($options)
2 replies
FFilament
Created by slamx_ on 3/22/2024 in #❓┊help
Re-Render Form Schema
How can I use a variable that is set in the Emit function in the form schema? The form is in a modal and when the modal is opened, a fill method is used to set the data (edit form). Depending on the authorization for the record, certain fields should now be set to disabled. Does anyone have a solution? Is it possible to re-render the schema with custom parameters?
14 replies
FFilament
Created by slamx_ on 3/13/2024 in #❓┊help
Unable to use TinyEditor Media Modal
I have the problem that I cannot use the media modals on a current Filament V2 project (e.g. the href for a link). The plugin that is used is: mohamedsabil83/filament-forms-tinyeditor (latest v1) @MohamedSabil83
5 replies
FFilament
Created by slamx_ on 3/1/2024 in #❓┊help
Table Action always the same record
I have the problem that my custom callback for the Action table always uses the first record. How can I fix this? Action::make('edit') ->action(function (UserItem $record): void { $this->emit('doEmitCallback', [ 'file' => $record->id ]); }) ->color('secondary') ->icon('heroicon-s-pencil'),
14 replies
FFilament
Created by slamx_ on 2/12/2024 in #❓┊help
Repeater Event listener not working
I have tried to use the listener as described in the documentation, but it does not work. The repeater is inserted in a tab. Is there anything to consider here? use Filament\Forms\Components\Component; protected function setUp(): void { parent::setUp(); $this->registerListeners([ 'repeater::createItem' => [ function (Component $component, string $statePath): void { if ($component->isDisabled()) { return; } if ($statePath !== $component->getStatePath()) { return; } // ... }, ], ]); }
2 replies
FFilament
Created by slamx_ on 2/9/2024 in #❓┊help
Multi Select / Dropdown - Close after select one
How I can close the dropdown after select one item?
3 replies