From 990e07c12def783c93b72e8dea2b62f8e0d27209 Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Fri, 11 Jun 2021 15:38:06 +0300 Subject: [PATCH] Fixed #1341 - Chip templating support for AutoComplete and MultiSelec --- api-generator/components/autocomplete.js | 4 ++++ api-generator/components/multiselect.js | 4 ++++ src/components/autocomplete/AutoComplete.d.ts | 6 +++++- src/components/autocomplete/AutoComplete.vue | 4 +++- src/components/multiselect/MultiSelect.d.ts | 6 ++++++ src/components/multiselect/MultiSelect.vue | 4 +++- src/views/autocomplete/AutoCompleteDoc.vue | 6 +++++- src/views/multiselect/MultiSelectDoc.vue | 6 +++++- 8 files changed, 35 insertions(+), 5 deletions(-) diff --git a/api-generator/components/autocomplete.js b/api-generator/components/autocomplete.js index db40675bc..a145ac724 100644 --- a/api-generator/components/autocomplete.js +++ b/api-generator/components/autocomplete.js @@ -190,6 +190,10 @@ const AutoCompleteSlots = [ { name: "footer", description: "Custom content for the component footer." + }, + { + name: "chip", + description: "Custom content for the chip display." } ]; diff --git a/api-generator/components/multiselect.js b/api-generator/components/multiselect.js index 92dfa8efd..874296e69 100644 --- a/api-generator/components/multiselect.js +++ b/api-generator/components/multiselect.js @@ -242,6 +242,10 @@ const MultiSelectSlots = [ { name: "empty", description: "Custom content when there is no data to display" + }, + { + name: "chip", + description: "Custom content for the chip display." } ]; diff --git a/src/components/autocomplete/AutoComplete.d.ts b/src/components/autocomplete/AutoComplete.d.ts index ab55c1058..a529b8939 100755 --- a/src/components/autocomplete/AutoComplete.d.ts +++ b/src/components/autocomplete/AutoComplete.d.ts @@ -28,7 +28,11 @@ declare class AutoComplete { $emit(eventName: 'complete', e: {originalEvent: Event, query: string}): this; $emit(eventName: 'clear'): this; $slots: { - list: VNode[]; + item: VNode[]; + optiongroup: VNode[]; + header: VNode[]; + footer: VNode[]; + chip: VNode[]; }; } diff --git a/src/components/autocomplete/AutoComplete.vue b/src/components/autocomplete/AutoComplete.vue index b0ef6aa91..3420af0c4 100755 --- a/src/components/autocomplete/AutoComplete.vue +++ b/src/components/autocomplete/AutoComplete.vue @@ -4,7 +4,9 @@ type="text" autoComplete="off" v-if="!multiple" role="searchbox" aria-autocomplete="list" :aria-controls="listId">