Update 03-select.md

This commit is contained in:
Dan Harrin
2023-11-26 10:34:39 +00:00
committed by GitHub
parent e22bad1118
commit 49ae7fc088
+2 -1
View File
@@ -160,12 +160,13 @@ Select::make('technologies')
->relationship(titleAttribute: 'name')
```
> When using `disabled()` with `relationship()`, ensure that `disabled()` is called before `relationship()`. This ensures that the `dehydrated()` call from within `relationship()` is not overridden by the call from `disabled()`.
When using `disabled()` with `multiple()` and `relationship()`, ensure that `disabled()` is called before `relationship()`. This ensures that the `dehydrated()` call from within `relationship()` is not overridden by the call from `disabled()`:
```php
use Filament\Forms\Components\Select;
Select::make('technologies')
->multiple()
->disabled()
->relationship(titleAttribute: 'name')
```