Fixed #3899 - AutoComplete: class style and click event refactor on removetokenicon scoped slot
parent
03d419e6c2
commit
48b33f4f81
|
@ -413,7 +413,16 @@ export interface AutoCompleteSlots {
|
||||||
/**
|
/**
|
||||||
* Custom remove token icon template in multiple mode.
|
* Custom remove token icon template in multiple mode.
|
||||||
*/
|
*/
|
||||||
removetokenicon(): VNode[];
|
removetokenicon(scope: {
|
||||||
|
/**
|
||||||
|
* Style class of the icon.
|
||||||
|
*/
|
||||||
|
class: string;
|
||||||
|
/**
|
||||||
|
* Remove token icon function.
|
||||||
|
*/
|
||||||
|
onClick: void;
|
||||||
|
}): VNode[];
|
||||||
/**
|
/**
|
||||||
* Custom loading icon template.
|
* Custom loading icon template.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
<slot name="chip" :value="option">
|
<slot name="chip" :value="option">
|
||||||
<span class="p-autocomplete-token-label">{{ getOptionLabel(option) }}</span>
|
<span class="p-autocomplete-token-label">{{ getOptionLabel(option) }}</span>
|
||||||
</slot>
|
</slot>
|
||||||
<slot name="removetokenicon">
|
<slot name="removetokenicon" class="p-autocomplete-token-icon" :onClick="(event) => removeOption(event, i)">
|
||||||
<component :is="removeTokenIcon ? 'span' : 'TimesCircleIcon'" :class="['p-autocomplete-token-icon', removeTokenIcon]" @click="removeOption($event, i)" aria-hidden="true" />
|
<component :is="removeTokenIcon ? 'span' : 'TimesCircleIcon'" :class="['p-autocomplete-token-icon', removeTokenIcon]" @click="removeOption($event, i)" aria-hidden="true" />
|
||||||
</slot>
|
</slot>
|
||||||
</li>
|
</li>
|
||||||
|
|
Loading…
Reference in New Issue