InputSelectMultiple.vue component is a multi-select input field with advanced features such as searching, toggles for selection, and customizable controls. It allows users to select multiple options from a given list and provides flexibility for handling various use cases.
Features
Multi-Select Support
Select multiple options simultaneously, enhancing flexibility for various use cases.
Searchable Options
Includes an optional search input for filtering options, allowing users to find selections quickly.
Toggles for Selection
Enables toggle-based selection, providing an alternative to the traditional dropdown.
Customizable Controls
Includes actions like “Select All” and “Clear All” to manage selections with ease.
Reactive Options
Dynamically updates selected values with
v-model, ensuring real-time synchronization.Usage
Basic Example
Props
Enables “Select All” and “Clear All” controls.
Error message to display below the input field.
Label text displayed above the input field.
Label text for an empty option.
Allows for a nullable (empty) option.
The list of options available for selection.
Enables a search input for filtering options.
Defines the structure of options (
value and text keys).Enables toggle-based selection for options.
Specifies the input type.
Two-way binding for the selected options.
Width of the input field as a percentage.
Example Use Cases
Disabled Input with Controls
Read-Only Input
Example with Search and Toggles
Example with Controls and Error Handling
Notes
- Reactive Options: The
v-modelbinding ensures the selected values are updated in real-time. - Search Functionality: Use the
searchprop to enable filtering options dynamically. - Control Actions: The
controlsprop adds “Select All” and “Clear All” buttons for enhanced usability.