diff --git a/api-generator/components/multiselect.js b/api-generator/components/multiselect.js index aec2a9a62..14fbcbe37 100644 --- a/api-generator/components/multiselect.js +++ b/api-generator/components/multiselect.js @@ -182,9 +182,39 @@ const MultiSelectProps = [ { name: 'loadingIcon', type: 'string', - default: 'pi pi-spinner pi-spin', + default: 'null', description: 'Icon to display in loading state.' }, + { + name: 'checkboxIcon', + type: 'string', + default: 'null', + description: 'Icon to display in the checkboxes.' + }, + { + name: 'closeIcon', + type: 'string', + default: 'null', + description: 'Icon to display in the dropdown close button.' + }, + { + name: 'dropdownIcon', + type: 'string', + default: 'null', + description: 'Icon to display in the dropdown.' + }, + { + name: 'filterIcon', + type: 'string', + default: 'null', + description: 'Icon to display in filter input.' + }, + { + name: 'removeTokenIcon', + type: 'string', + default: 'null', + description: 'Icon to display in chip remove action.' + }, { name: 'selectAll', type: 'boolean', @@ -357,7 +387,7 @@ const MultiSelectEvents = [ const MultiSelectSlots = [ { name: 'value', - description: 'Custom content for the item value' + description: 'Custom content for the item value.' }, { name: 'chip', @@ -365,39 +395,59 @@ const MultiSelectSlots = [ }, { name: 'indicator', - description: 'Custom content for the dropdown indicator' + description: 'Custom content for the dropdown indicator.' }, { name: 'header', - description: "Custom content for the component's header" + description: "Custom content for the component's header." }, { name: 'footer', - description: "Custom content for the component's footer" + description: "Custom content for the component's footer." }, { name: 'option', - description: "Custom content for the item's option" + description: "Custom content for the item's option." }, { name: 'optiongroup', - description: "Custom content for the item's optiongroup" + description: "Custom content for the item's optiongroup." }, { name: 'emptyfilter', - description: 'Custom content when there is no filtered data to display' + description: 'Custom content when there is no filtered data to display.' }, { name: 'empty', - description: 'Custom content when there is no data to display' + description: 'Custom content when there is no data to display.' }, { name: 'content', - description: 'Custom content for the virtual scroller' + description: 'Custom content for the virtual scroller.' }, { name: 'loader', - description: 'Custom content for the virtual scroller loader items' + description: 'Custom content for the virtual scroller loader items.' + }, + { + name: 'removetokenicon', + description: 'Custom remove token icon template.' + }, + { + name: 'headercheckboxicon', + description: 'Custom header checkbox icon template.' + }, + { + name: 'filtericon', + description: 'Custom filter icon template.' + }, + { + name: 'closeicon', + description: 'Custom close icon template.' + }, + { + name: 'itemcheckboxicon', + description: 'Custom item checkbox icon template.' } ]; diff --git a/components/lib/multiselect/MultiSelect.d.ts b/components/lib/multiselect/MultiSelect.d.ts index befe1b2c0..38c46e635 100755 --- a/components/lib/multiselect/MultiSelect.d.ts +++ b/components/lib/multiselect/MultiSelect.d.ts @@ -191,32 +191,26 @@ export interface MultiSelectProps { loading?: boolean | undefined; /** * Icon to display in the checkboxes. - * @defaultValue pi pi-check */ checkboxIcon?: string | undefined; /** * Icon to display in the dropdown close button. - * @defaultValue pi pi-times */ closeIcon?: string | undefined; /** * Icon to display in the dropdown. - * @defaultValue pi pi-chevron-down */ dropdownIcon?: string | undefined; /** * Icon to display in filter input. - * @defaultValue pi pi-search */ filterIcon?: string | undefined; /** * Icon to display in loading state. - * @defaultValue pi pi-spinner pi-spin */ loadingIcon?: string | undefined; /** * Icon to display in chip remove action. - * @defaultValue pi pi-times-circle */ removeTokenIcon?: string | undefined; /** @@ -414,6 +408,38 @@ export interface MultiSelectSlots { */ options: any[]; }): VNode[]; + /** + * Custom remove token icon template. + */ + removetokenicon(): VNode[]; + /** + * Custom header checkbox icon template. + * @param {Object} scope - header checkbox icon slot's params. + */ + headercheckboxicon(scope: { + /** + * Options of the loader items for virtualscroller + */ + allSelected: boolean; + }): VNode[]; + /** + * Custom filter icon template. + */ + filtericon(): VNode[]; + /** + * Custom close icon template. + */ + closeicon(): VNode[]; + /** + * Custom item checkbox icon template. + * @param {Object} scope - header checkbox icon slot's params. + */ + itemcheckboxicon(scope: { + /** + * Options of the loader items for virtualscroller + */ + selected: boolean; + }): VNode[]; } /** diff --git a/components/lib/multiselect/MultiSelect.vue b/components/lib/multiselect/MultiSelect.vue index eda574102..8128d6f9e 100755 --- a/components/lib/multiselect/MultiSelect.vue +++ b/components/lib/multiselect/MultiSelect.vue @@ -33,7 +33,9 @@ {{ getLabelByValue(item) }} - + + + @@ -42,7 +44,8 @@
- +
@@ -56,7 +59,9 @@
- + + +
@@ -76,13 +81,17 @@ @input="onFilterChange" v-bind="filterInputProps" /> - + + +
{{ filterResultMessageText }}
@@ -110,7 +119,9 @@ >
- + + +
@@ -147,6 +158,12 @@