mirror of
https://github.com/filamentphp/filament.git
synced 2026-10-24 01:58:00 +08:00
Update packages/forms/docs/03-fields/12-repeater.md
This commit is contained in:
@@ -580,7 +580,7 @@ Repeater::make('members')
|
||||
|
||||
This method will automatically enable the `distinct()` and `live()` methods on the field.
|
||||
|
||||
In case you want to add another disable condition, you can chain `disableOptionWhen` method, and set the second argument to `true`:
|
||||
In case you want to add another condition to [disable options](../select#disabling-specific-options) with, you can chain `disableOptionWhen()` with the `merge: true` argument:
|
||||
|
||||
```php
|
||||
use Filament\Forms\Components\Repeater;
|
||||
@@ -593,7 +593,7 @@ Repeater::make('members')
|
||||
// ...
|
||||
])
|
||||
->disableOptionsWhenSelectedInSiblingRepeaterItems()
|
||||
->disableOptionWhen(fn (string $value): bool => $value === 'published', true),
|
||||
->disableOptionWhen(fn (string $value): bool => $value === 'super_admin', merge: true),
|
||||
])
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user