From 6f63e5f6af416df147d6a9bdb7f4f5f71a9fa547 Mon Sep 17 00:00:00 2001 From: Dan Harrin Date: Sat, 10 Feb 2024 10:19:36 +0000 Subject: [PATCH] Update 03-select.md --- packages/forms/docs/03-fields/03-select.md | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/packages/forms/docs/03-fields/03-select.md b/packages/forms/docs/03-fields/03-select.md index f004d3760f..4acfba1f19 100644 --- a/packages/forms/docs/03-fields/03-select.md +++ b/packages/forms/docs/03-fields/03-select.md @@ -367,28 +367,6 @@ MorphToSelect::make('commentable') ]) ``` -#### Allowing select to be non-native - -You may enable a more customizable JavaScript select using the `native(false)` method: - -```php -use Filament\Forms\Components\MorphToSelect; -use Illuminate\Database\Eloquent\Builder; - -MorphToSelect::make('commentable') - ->native(false) - ->types([ - MorphToSelect\Type::make(Product::class) - ->titleAttribute('name') - ->modifyOptionsQueryUsing(fn (Builder $query) => $query->whereBelongsTo($this->team)), - MorphToSelect\Type::make(Post::class) - ->titleAttribute('title') - ->modifyOptionsQueryUsing(fn (Builder $query) => $query->whereBelongsTo($this->team)), - ]) -``` - -> Many of the same options in the select field are available for `MorphToSelect`, including `searchable()`, `preload()`, `allowHtml()`, and `optionsLimit()`. - ## Allowing HTML in the option labels By default, Filament will escape any HTML in the option labels. If you'd like to allow HTML, you can use the `allowHtml()` method: