MazChecklist
MazChecklist is a standalone component that allows creating a checklist with integrated search functionality. It provides a flexible and customizable user interface for selecting multiple items from a list of options. The component supports real-time search, color customization, and displays messages when no results are found.
Before use it, you should install the MazUi plugin in your project, follow instructions in Getting Started
TIP
This component can be translated globally using the MazUi plugin.
Basic usage
Selected languages: none
query value: none
Custom search function
You can replace the default search function by providing a custom search function. Useful when you need to search by multiple fields, if you want to use a different search algorithm or if you want search into your database by fetching data from an API.
Selected employees: none
Props
| Name | Description | Type | Required | Default |
|---|---|---|---|---|
| model-value | The model value of the checklist (selected items) | (T extends unknown)[] | No | undefined |
| query | The query to filter the items (model) | string | No | undefined |
| items | The list of items to display | (O extends MazChecklistItemOption)[] | No | undefined |
| title | The title of the checklist | string | No | undefined |
| elevation | Add elevation to the card | boolean | No | false |
| search | The search input options | boolean | MazInputProps | No | { enabled: false, debounce: 300, autoFocus: false } |
| search-options | The options to normalize the search query (used by the default search function) By default, the threshold is 0.75 | intersection | No | undefined |
| search-function | Replace the default search function to provide a custom search function | TSFunctionType | No | undefined |
| color | The color of the checklist (card, checkbox and search input) | MazColor | No | primary |
| translations | Translations of the checklist component | DeepPartial<MazUiTranslationsNestedSchema['checklist']> | No | Translations from @maz-ui/translations |
Events
| Event name | Properties | Description |
|---|---|---|
| update:query | value mixed - The new query | Emitted when the query change |
| update:model-value | value mixed - The new value | Emitted when the model value change |
Slots
| Name | Description | Bindings |
|---|---|---|
| title | use this slot to customize the title | |
| no-results | use this slot to customize the no results area | |
| no-results-text | use this slot to customize the no results message | |
| item | use this slot to customize the item |