docs: added info on usage to the docs

Signed-off-by: Lukas Frey <mail@lukasfrey.cz>
This commit is contained in:
Lukas Frey
2023-07-24 12:56:36 +02:00
parent bd07935e3c
commit d44aa96924
@@ -18,6 +18,22 @@ Select::make('status')
])
```
You can optionally also add groups by adding an array instead of a label in the options:
```php
use Filament\Forms\Components\Select;
Select::make('status')
->options([
'In Process' => [
'draft' => 'Draft',
'reviewing' => 'Reviewing',
],
'published' => 'Published',
])
```
<AutoScreenshot name="forms/fields/select/simple" alt="Select" version="3.x" />
## Searching options