diff --git a/api-generator/components/autocomplete.js b/api-generator/components/autocomplete.js index 98e6fab04..14412ab63 100644 --- a/api-generator/components/autocomplete.js +++ b/api-generator/components/autocomplete.js @@ -161,12 +161,30 @@ const AutoCompleteProps = [ default: 'null', description: 'Uses to pass all properties of the HTMLDivElement to the overlay panel inside the component.' }, + { + name: 'dropdownIcon', + type: 'string', + default: 'null', + description: 'Icon to display in the dropdown.' + }, + { + name: 'dropdownClass', + type: 'string', + default: 'null', + description: 'Style class of the dropdown button.' + }, { name: 'loadingIcon', type: 'string', - default: 'pi pi-spinner', + default: 'null', description: 'Icon to display in loading state.' }, + { + name: 'removeTokenIcon', + type: 'string', + default: 'null', + description: 'Icon to display in chip remove action.' + }, { name: 'virtualScrollerOptions', type: 'object', @@ -396,6 +414,18 @@ const AutoCompleteSlots = [ { name: 'empty', description: 'Custom empty template when there is no data to display.' + }, + { + name: 'dropdownicon', + description: 'Custom dropdown icon template.' + }, + { + name: 'removetokenicon', + description: 'Custom remove token icon template.' + }, + { + name: 'loadingicon', + description: 'Custom loading icon template.' } ]; diff --git a/components/lib/autocomplete/AutoComplete.d.ts b/components/lib/autocomplete/AutoComplete.d.ts index d25601e07..def676430 100755 --- a/components/lib/autocomplete/AutoComplete.d.ts +++ b/components/lib/autocomplete/AutoComplete.d.ts @@ -206,7 +206,6 @@ export interface AutoCompleteProps { panelProps?: HTMLAttributes | undefined; /** * Icon to display in the dropdown. - * @defaultValue pi pi-chevron-down */ dropdownIcon?: string | undefined; /** @@ -215,12 +214,10 @@ export interface AutoCompleteProps { dropdownClass?: string | object | 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; /** @@ -406,6 +403,18 @@ export interface AutoCompleteSlots { * Custom empty template when there is no data to display. */ empty(): VNode[]; + /** + * Custom dropdown icon template. + */ + dropdownicon(): VNode[]; + /** + * Custom remove token icon template in multiple mode. + */ + removetokenicon(): VNode[]; + /** + * Custom loading icon template. + */ + loadingicon(): VNode[]; } /** diff --git a/components/lib/autocomplete/AutoComplete.vue b/components/lib/autocomplete/AutoComplete.vue index 0e0cf29f7..19a1b487a 100755 --- a/components/lib/autocomplete/AutoComplete.vue +++ b/components/lib/autocomplete/AutoComplete.vue @@ -53,7 +53,9 @@ {{ getOptionLabel(option) }} - + +
  • - - {{ searchResultMessageText }} @@ -140,6 +148,9 @@