primevue-mirror/api-generator/components/multiselect.js

319 lines
9.1 KiB
JavaScript
Raw Normal View History

2021-05-12 09:35:29 +00:00
const MultiSelectProps = [
{
name: "modelValue",
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",
type: "string",
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",
2021-12-07 06:21:20 +00:00
type: "boolean | 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."
},
{
name: "optionGroupLabel",
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 label of an option group."
},
{
name: "optionGroupChildren",
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 that refers to the children options of option group."
},
{
name: "scrollHeight",
type: "string",
default: "200px",
2021-05-14 09:20:08 +00:00
description: "Height of the viewport, a scrollbar is defined if height of list exceeds this value."
2021-05-12 09:35:29 +00:00
},
{
name: "filter",
type: "boolean",
default: "false",
description: "When specified, displays a filter input at header."
},
{
name: "filterPlaceholder",
type: "string",
default: "null",
description: "Placeholder text to show when filter input is empty."
},
{
name: "filterLocale",
type: "string",
default: "undefined",
description: "Locale to use in filtering. The default locale is the host environment's current locale."
},
{
name: "filterMatchMode",
type: "string",
default: "contains",
description: 'Defines the filtering algorithm to use when searching the options. Valid values are "contains" (default), "startsWith" and "endsWith"'
},
{
name: "filterFields",
type: "array",
default: "null",
description: "Fields used when filtering the options, defaults to optionLabel."
},
{
name: "placeholder",
type: "string",
default: "null",
description: "Label to display when there are no selections."
},
{
name: "disabled",
type: "boolean",
default: "false",
description: "When present, it specifies that the component should be disabled."
},
{
name: "tabindex",
type: "string",
default: "null",
description: "Index of the element in tabbing order."
},
{
name: "inputId",
type: "string",
default: "null",
description: "Identifier of the underlying input element."
},
{
name: "dataKey",
type: "string",
default: "null",
description: "A property to uniquely identify an option."
},
{
name: "ariaLabelledBy",
type: "string",
default: "null",
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.'
},
{
name: "emptyFilterMessage",
type: "string",
default: "No results found",
description: "Text to display when filtering does not return any results. Defaults to value from PrimeVue locale configuration."
},
{
name: "emptyMessage",
type: "string",
default: "No results found",
description: "Text to display when there are no options available. Defaults to value from PrimeVue locale configuration."
},
{
name: "display",
type: "string",
default: "comma",
description: 'Defines how the selected items are displayed, valid values are "comma" and "chip".'
},
{
name: "panelClass",
type: "string",
default: "null",
description: "Style class of the overlay panel."
2021-05-14 09:18:42 +00:00
},
{
name: "selectionLimit",
type: "number",
default: "null",
description: "Maximum number of selectable items."
},
{
name: "showToggleAll",
type: "boolean",
default: "false",
description: "Whether to show the header checkbox to toggle the selection of all items at once."
},
{
name: "loading",
type: "boolean",
default: "false",
description: "Whether the multiselect is in loading state."
},
{
name: "loadingIcon",
type: "string",
default: "pi pi-spinner pi-spin",
description: "Icon to display in loading state."
2021-08-17 11:09:12 +00:00
},
{
name: "maxSelectedLabels",
type: "number",
default: "null",
description: "Decides how many selected item labels to show at most."
},
{
name: "selectedItemsLabel",
type: "string",
default: "{0} items selected",
description: "Label to display after exceeding max selected labels."
},
{
name: "selectAll",
type: "boolean",
default: "false",
description: "Whether all data is selected."
},
{
name: "resetFilterOnHide",
type: "boolean",
default: "false",
description: "Clears the filter value when hiding the dropdown."
},
2021-08-17 11:09:12 +00:00
{
name: "virtualScrollerOptions",
type: "object",
default: "null",
description: "Whether to use the virtualScroller feature. The properties of VirtualScroller component can be used like an object in it."
},
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
},
{
name: "selectall-change",
description: "Callback to invoke when all data is selected.",
arguments: [
{
name: "event.originalEvent",
type: "object",
description: "Browser event"
},
{
name: "event.checked",
type: "boolean",
description: "Whether all data is selected."
}
]
2021-05-12 09:35:29 +00:00
}
];
const MultiSelectSlots = [
{
name: "option",
description: "Custom content for the item's option"
},
{
name: "optiongroup",
description: "Custom content for the item's optiongroup"
},
{
name: "value",
description: "Custom content for the item value"
},
{
name: "header",
description: "Custom content for the component's header"
},
{
name: "footer",
description: "Custom content for the component's footer"
},
{
name: "emptyfilter",
description: "Custom content when there is no filtered data to display"
},
{
name: "empty",
description: "Custom content when there is no data to display"
},
{
name: "chip",
description: "Custom content for the chip display."
},
{
name: "content",
description: "Custom content for the virtual scroller"
},
{
name: "loader",
description: "Custom content for the virtual scroller loader items"
2021-08-27 13:58:51 +00:00
},
{
name: "indicator",
description: "Custom content for the dropdown 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
}
};