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.
|
||||
*/
|
||||
removetokenicon(): VNode[];
|
||||
removetokenicon(scope: {
|
||||
/**
|
||||
* Style class of the icon.
|
||||
*/
|
||||
class: string;
|
||||
/**
|
||||
* Remove token icon function.
|
||||
*/
|
||||
onClick: void;
|
||||
}): VNode[];
|
||||
/**
|
||||
* Custom loading icon template.
|
||||
*/
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
<slot name="chip" :value="option">
|
||||
<span class="p-autocomplete-token-label">{{ getOptionLabel(option) }}</span>
|
||||
</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" />
|
||||
</slot>
|
||||
</li>
|
||||
|
|
Loading…
Reference in New Issue