Skip to content

Commit

Permalink
Update packages/forms/docs/03-fields/12-repeater.md
Browse files Browse the repository at this point in the history
  • Loading branch information
danharrin authored Jan 10, 2025
1 parent 6dea41e commit 7eb2b2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/forms/docs/03-fields/12-repeater.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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),
])
```

Expand Down

0 comments on commit 7eb2b2c

Please sign in to comment.