Open martin-ro opened 3 months ago
filament/filament
v3.2.99
v11.20.0
No response
PHP 8.2
When using the blockPreviews for Builder the reactivity in the modal form doesn't work once the block is saved.
blockPreviews
Builder
https://github.com/user-attachments/assets/0fb1a824-7025-4f7e-937e-9d1523ea96d1
Same as without blockPreviews
See https://github.com/martin-ro/block-builder (UserResource)
or
add this to a from:
Forms\Components\Builder::make('blocks') ->blockPreviews() ->schema([ Forms\Components\Builder\Block::make('test') ->preview('components.test') ->schema([ Forms\Components\Checkbox::make('is_company') ->live(), Forms\Components\TextInput::make('company_name') ->hidden(fn(Forms\Get $get): bool => !$get('is_company')) ]) ])
https://github.com/martin-ro/block-builder
Another observation I just made is that wrapping components in for example a group or fieldset reactivity works inside it. So this is only broken for "top level" components.
Package
filament/filament
Package Version
v3.2.99
Laravel Version
v11.20.0
Livewire Version
No response
PHP Version
PHP 8.2
Problem description
When using the
blockPreviews
forBuilder
the reactivity in the modal form doesn't work once the block is saved.https://github.com/user-attachments/assets/0fb1a824-7025-4f7e-937e-9d1523ea96d1
Expected behavior
Same as without
blockPreviews
Steps to reproduce
See https://github.com/martin-ro/block-builder (UserResource)
or
add this to a from:
Reproduction repository (issue will be closed if this is not valid)
https://github.com/martin-ro/block-builder
Relevant log output
No response
Donate 💰 to fund this issue