Upgrade to 4.0.0
This commit is contained in:
@@ -1,35 +1,23 @@
|
||||
<?php
|
||||
|
||||
use Kirby\Toolkit\Str;
|
||||
use Kirby\Toolkit\V;
|
||||
|
||||
return [
|
||||
'extends' => 'tags',
|
||||
'props' => [
|
||||
/**
|
||||
* Unset inherited props
|
||||
* If set to `all`, any type of input is accepted. If set to `options` only the predefined options are accepted as input.
|
||||
*/
|
||||
'accept' => null,
|
||||
'accept' => function ($value = 'options') {
|
||||
return V::in($value, ['all', 'options']) ? $value : 'all';
|
||||
},
|
||||
/**
|
||||
* Custom icon to replace the arrow down.
|
||||
*/
|
||||
'icon' => function (string $icon = null) {
|
||||
'icon' => function (string $icon = 'checklist') {
|
||||
return $icon;
|
||||
},
|
||||
/**
|
||||
* Enable/disable the search in the dropdown
|
||||
* Also limit displayed items (display: 20)
|
||||
* and set minimum number of characters to search (min: 3)
|
||||
*/
|
||||
'search' => function ($search = true) {
|
||||
return $search;
|
||||
},
|
||||
/**
|
||||
* If `true`, selected entries will be sorted
|
||||
* according to their position in the dropdown
|
||||
*/
|
||||
'sort' => function (bool $sort = false) {
|
||||
return $sort;
|
||||
},
|
||||
],
|
||||
'methods' => [
|
||||
'toValues' => function ($value) {
|
||||
|
Reference in New Issue
Block a user