Skip to content

Commit

Permalink
Added option to make multi select searchable
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominik Hagen authored and ifox committed Jun 22, 2021
1 parent 814ade6 commit bbead39
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/.sections/form-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,7 @@ When used in a [block](https://twill.io/docs/#adding-blocks), no migration is ne
| max | Maximum number of selectable options | integer | |
| options | Array of options for the dropdown, must include _value_ and _label_ | array | |
| unpack | Defines if the multi select will be displayed as an open list of options | true<br/>false | true |
| searchable | Filter the field values while typing | true<br/>false | false |
| note | Hint message displayed above the field | string | |
| placeholder | Text displayed as a placeholder in the field | string | |
| required | Displays an indicator that this field is required<br/>A backend validation rule is required to prevent users from saving | true<br/>false | false |
Expand Down
3 changes: 2 additions & 1 deletion views/partials/form/_multi_select.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
@if ($placeholder ?? false) placeholder="{{ $placeholder }}" @endif
@if ($inModal) :in-modal="true" @endif
@if ($addNew) add-new='{{ $storeUrl }}' @elseif ($note) note='{{ $note }}' @endif
@if ($endpoint ?? false) :searchable="true" endpoint="{{ $endpoint }}" @endif
@if ($searchable ?? $endpoint ?? false) :searchable="true" @endif
@if ($endpoint ?? false) endpoint="{{ $endpoint }}" @endif
:multiple="true"
in-store="inputValue"
>
Expand Down

0 comments on commit bbead39

Please sign in to comment.