-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Copy link
Labels
Milestone
Description
Package
filament/filament
Package Version
v4.7.0
Laravel Version
v12.50.0
Livewire Version
v3.7.8
PHP Version
8.4.17
Problem description
When using partiallyRenderComponentsAfterStateUpdated inside a table repeater, the disabled state is not correctly updated.
It happens only with a combination of repeater with table method, partiallyRenderComponentsAfterStateUpdated, and disabled on the targeted field.
Example:
Repeater::make('repeater')
->table([
Repeater\TableColumn::make('Checked'),
Repeater\TableColumn::make('Type'),
])
->schema([
Toggle::make('checked')
->live()
->partiallyRenderComponentsAfterStateUpdated([
'type',
])
->afterStateUpdated(function (Set $set, bool $state) {
if ($state) {
$set('type', 'radio');
}
}),
Select::make('type')
->options([
'radio' => 'Radio',
'checkbox' => 'Checkbox',
'toggle' => 'Toggle',
'select' => 'Select',
])
->disabled(fn (Get $get) => $get('checked')),
]),In this example, the Select field value is correctly updated but not disabled.
If you remove this part
->partiallyRenderComponentsAfterStateUpdated([
'type',
])it works normally.
I will try to submit a fix for that today.
Expected behavior
The Select field should be automatically disabled on state update
Steps to reproduce
- Install reproduction repository
- Go to the Issue menu
- Add an element in repeater
- Try to toggle
Reproduction repository (issue will be closed if this is not valid)
Relevant log output
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done