Skip to content

Commit

Permalink
documentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
kallefrombosnia authored and haringsrob committed May 23, 2022
1 parent 724d2a8 commit ea0889b
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions docs/src/form-fields/select.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,36 @@ Select::make()
| default | Sets a default value if empty | string | |
| disabled | Disables the field | boolean | false |


Select item option
| Option | Description | Type/values | Default value |
| :---------- | :----------------------------------------------------------- | :-------------- | :------------ |
| selectable | Defines if select item should be selectable in the select or not | boolean | true |

Example of `selectable` prop usage:
```php
@formField('select', [
'name' => 'office',
'label' => 'Office',
'placeholder' => 'Select an office',
'options' => [
[
'value' => 1,
'label' => 'New York'
],
[
'value' => 2,
'label' => 'London'
],
[
'value' => 3,
'label' => 'Berlin',
'selectable' => false // This item will be non-selectable in the select form component
]
]
])
```

A migration to save a `select` field would be:

```php
Expand Down

0 comments on commit ea0889b

Please sign in to comment.