mathieutu
mathieutu
FFilament
Created by mathieutu on 12/5/2024 in #❓┊help
Replicate with relationship repeater updates original relation records but doesn't create new ones
Pretty much everything in the title. Replicating an invoice, showing the resource form in the replicate modal. When updating the repeating items, the form will update the original items instead of creating new ones. We also can't create the new items in the after method, as the items are not present in the provided $data. Any idea how to achieve that, or should we open an issue?
8 replies
FFilament
Created by mathieutu on 12/4/2024 in #❓┊help
Tenant menu doesn't refresh when the tenant is updated.
Hi, When the tenant is updated, the tenant menu is not, showing the old info. Is there a way to do that, or should I open an issue? Thanks.
2 replies
FFilament
Created by mathieutu on 11/22/2024 in #❓┊help
Computed state in form fields.
Hi, I'd like to have the state totally computed in some form fields. The state would be calculated with a function, and refreshed at each render. Like a Placeholder, but with real fields. Basically doing the same as we can with disabled, or readOnly but with the state. On the table, we can use getStateUsing: Tables\Columns\TextColumn::make('foo')->getStateUsing(fn ($record) => Foo::compute($record)) Setting the state directly using state(fn() => ...) on a TextInput throws an error: Typed property Filament\Forms\Components\Component::$container must not be accessed before initialization (in the getLivewire function). Is it something easily possible? Could we add a getStateUsing to the input as well? (I can open a PR) Thanks!
4 replies