Select
Select components.
Select Native, Personalization Blocks
Example:
TallStackUi::personalize() ->select() ->block('block', 'classes');
Select Styled, Personalization Blocks
Example:
TallStackUi::personalize() ->select('styled') ->block('block', 'classes');
An option to use multi-dimensional array.
When the value and label do not come from the label
and value
positions respectively, you must specify this manually using the select
attribute:
<x-select.native :options="[ ['name' => 'TALL', 'id' => 1], ['name' => 'LIVT', 'id' => 2],]" select="label:name|value:id" />
This option is also available for the other select components below.
Customized styled select component to interact with Livewire.
An option to make the select component required.
The user will not be able to deselect the selected option after selecting an option.
An option to use multi-dimensional array.
When the value and label do not come from the label
and value
positions respectively, you must specify this manually using the select
attribute:
<x-select.styled :options="[ ['name' => 'TALL', 'id' => 1], ['name' => 'LIVT', 'id' => 2],]" select="label:name|value:id" />
An option to disable specific options.
An option to limit the number of selections.
An option to interact with the search term when nothing is found.
The styled select component allows you to search for values through an API.
In this mode, all the options available above remain available to be used,
the difference is that instead of defining the options using the options
parameter, you must specify the URL from which the results will come, together
with the select
parameter, which is mandatory for this mode.
For identification purposes, a header X-Tallstack-Ui is sent in the request.
Customized styled select component to interact with APIs.
The params
are updated when you make changes. This means that if you are using this
component within the Livewire components and create a variable to be used in params
, when
making any changes to this variable and Livewire hydrate the page, the next time the select
is opened to make a new request, params
will be updated in the request. This is useful
to allow you to use the params
to interact dynamically with the query of the request.