mathieutu
Macroable class not compatible with ide-helper package.
Hey folks,
just FYI we tried to make ide-help compatible with Filament macro, but we're arriving to a dead-end because of the differences between your implementation and the standard one.
see https://github.com/barryvdh/laravel-ide-helper/pull/1629#issuecomment-2596171219
1 replies
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
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