From ea0889b50b3285bdddc5ae6a1919c08047ac3fb1 Mon Sep 17 00:00:00 2001 From: Izet Mulalic Date: Wed, 27 Apr 2022 22:20:26 +0200 Subject: [PATCH] documentation update --- docs/src/form-fields/select.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/src/form-fields/select.md b/docs/src/form-fields/select.md index 0eb4689d9..624311146 100644 --- a/docs/src/form-fields/select.md +++ b/docs/src/form-fields/select.md @@ -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