2021-05-12 09:35:29 +00:00
const MultiSelectProps = [
{
2022-08-22 13:47:07 +00:00
name : "value" ,
2021-05-12 09:35:29 +00:00
type : "any" ,
default : "null" ,
description : "Value of the component."
} ,
{
name : "options" ,
type : "array" ,
default : "null" ,
description : "An array of selectitems to display as the available options."
} ,
{
name : "optionLabel" ,
2022-08-22 13:47:07 +00:00
type : "string | function" ,
2021-05-12 09:35:29 +00:00
default : "null" ,
description : "Property name or getter function to use as the label of an option."
} ,
{
name : "optionValue" ,
2021-12-07 06:21:20 +00:00
type : "string | function" ,
2021-05-12 09:35:29 +00:00
default : "null" ,
description : "Property name or getter function to use as the value of an option, defaults to the option itself when not defined."
} ,
{
name : "optionDisabled" ,
2022-08-22 13:47:07 +00:00
type : "string | function" ,
2021-05-12 09:35:29 +00:00
default : "null" ,
description : "Property name or getter function to use as the disabled flag of an option, defaults to false when not defined."
} ,
{
2022-08-22 13:47:07 +00:00
name : "scrollHeight" ,
type : "string" ,
default : "200px" ,
description : "Height of the viewport in pixels, a scrollbar is defined if height of list exceeds this value."
2021-05-12 09:35:29 +00:00
} ,
{
2022-08-22 13:47:07 +00:00
name : "filter" ,
type : "boolean" ,
default : "false" ,
description : "When specified, displays a filter input at header."
} ,
{
name : "filterPlaceholder" ,
type : "string" ,
2021-05-12 09:35:29 +00:00
default : "null" ,
2022-08-22 13:47:07 +00:00
description : "Placeholder text to show when filter input is empty."
2021-05-12 09:35:29 +00:00
} ,
{
2022-08-22 13:47:07 +00:00
name : "filterLocale" ,
2021-05-12 09:35:29 +00:00
type : "string" ,
2022-08-22 13:47:07 +00:00
default : "undefined" ,
description : "Locale to use in filtering. The default locale is the host environment's current locale."
2021-05-12 09:35:29 +00:00
} ,
{
2022-07-29 04:18:45 +00:00
name : "placeholder" ,
type : "string" ,
default : "null" ,
description : "Label to display when there are no selections."
} ,
{
name : "disabled" ,
2021-05-12 09:35:29 +00:00
type : "boolean" ,
default : "false" ,
2022-07-29 04:18:45 +00:00
description : "When present, it specifies that the component should be disabled."
2021-05-12 09:35:29 +00:00
} ,
{
2022-08-22 13:47:07 +00:00
name : "tabindex" ,
2021-05-12 09:35:29 +00:00
type : "string" ,
default : "null" ,
2022-08-22 13:47:07 +00:00
description : "Index of the element in tabbing order."
2021-05-12 09:35:29 +00:00
} ,
{
2022-08-22 13:47:07 +00:00
name : "inputId" ,
2021-05-12 09:35:29 +00:00
type : "string" ,
default : "null" ,
2022-08-22 13:47:07 +00:00
description : "Identifier of the underlying input element."
2021-05-12 09:35:29 +00:00
} ,
{
name : "dataKey" ,
type : "string" ,
default : "null" ,
description : "A property to uniquely identify an option."
} ,
{
2022-08-22 13:47:07 +00:00
name : "ariaLabelledBy" ,
2021-05-12 09:35:29 +00:00
type : "string" ,
default : "null" ,
2022-08-22 13:47:07 +00:00
description : 'A valid query selector or an HTMLElement to specify where the overlay gets attached. Special keywords are "body" for document body and "self" for the element itself.'
2021-05-12 09:35:29 +00:00
} ,
{
2022-08-22 13:47:07 +00:00
name : "emptyFilterMessage" ,
2021-05-12 09:35:29 +00:00
type : "string" ,
2022-08-22 13:47:07 +00:00
default : "No results found" ,
description : "Text to display when filtering does not return any results. Defaults to value from PrimeVue locale configuration."
2022-07-29 04:18:45 +00:00
} ,
{
name : "appendTo" ,
type : "string" ,
2022-08-22 13:47:07 +00:00
default : "null" ,
description : 'Id of the element or "body" for document where the overlay should be appended to.'
2021-05-12 09:35:29 +00:00
} ,
{
name : "display" ,
type : "string" ,
default : "comma" ,
description : 'Defines how the selected items are displayed, valid values are "comma" and "chip".'
} ,
2021-05-14 09:18:42 +00:00
{
name : "selectionLimit" ,
type : "number" ,
default : "null" ,
description : "Maximum number of selectable items."
} ,
{
name : "showToggleAll" ,
type : "boolean" ,
2022-07-29 04:18:45 +00:00
default : "true" ,
2022-08-22 13:47:07 +00:00
description : "Whether to show the header checkbox to toggle the selection of all items at once."
2022-07-29 04:18:45 +00:00
}
2021-05-12 09:35:29 +00:00
] ;
const MultiSelectEvents = [
{
name : "change" ,
description : "Callback to invoke on value change." ,
arguments : [
{
name : "event.originalEvent" ,
type : "object" ,
description : "Browser event"
} ,
{
name : "event.value" ,
type : "array" ,
description : "Selected option value"
}
]
} ,
{
name : "before-show" ,
description : "Callback to invoke before the overlay is shown."
} ,
{
name : "before-hide" ,
description : "Callback to invoke before the overlay is hidden."
} ,
{
name : "show" ,
description : "Callback to invoke when the overlay is shown."
} ,
{
name : "hide" ,
description : "Callback to invoke when the overlay is hidden."
} ,
{
name : "filter" ,
description : "Callback to invoke on filter input." ,
arguments : [
{
name : "event.originalEvent" ,
type : "object" ,
description : "Browser event"
} ,
{
name : "event.value" ,
type : "string" ,
description : "Filter value"
}
]
2021-08-17 11:09:12 +00:00
} ,
{
2022-08-22 13:47:07 +00:00
name : "input" ,
description : "Callback to invoke on value change." ,
2021-08-17 11:09:12 +00:00
arguments : [
{
2022-08-22 13:47:07 +00:00
name : "value" ,
type : "any" ,
description : "New value"
2021-08-17 11:09:12 +00:00
}
]
2021-05-12 09:35:29 +00:00
}
] ;
const MultiSelectSlots = [
2022-07-29 04:18:45 +00:00
{
name : "option" ,
description : "Custom content for the item's option"
} ,
{
2022-08-22 13:47:07 +00:00
name : "value" ,
description : "Custom content for the item value"
2021-08-17 14:09:43 +00:00
} ,
{
2022-08-22 13:47:07 +00:00
name : "indicator" ,
description : "Custom content for the multiselect indicator"
2021-05-12 09:35:29 +00:00
}
] ;
module . exports = {
multiselect : {
name : "MultiSelect" ,
description : "MultiSelect is used to multiple values from a list of options." ,
props : MultiSelectProps ,
events : MultiSelectEvents ,
slots : MultiSelectSlots
}
} ;