mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
parent
a8f3e2d5e3
commit
a42abd68a0
11 changed files with 53 additions and 7 deletions
10
components/lib/chips/Chips.d.ts
vendored
10
components/lib/chips/Chips.d.ts
vendored
|
@ -72,10 +72,12 @@ export interface ChipsProps {
|
|||
inputStyle?: object | undefined;
|
||||
/**
|
||||
* Uses to pass all properties of the HTMLInputElement to the focusable input element inside the component.
|
||||
* @deprecated since v3.26.0. Use 'pt' property instead.
|
||||
*/
|
||||
inputProps?: InputHTMLAttributes | undefined;
|
||||
/**
|
||||
* Icon to display in chip remove action.
|
||||
* @deprecated since v3.27.0. Use 'removetokenicon' slot.
|
||||
*/
|
||||
removeTokenIcon?: string | undefined;
|
||||
/**
|
||||
|
@ -111,8 +113,14 @@ export interface ChipsSlots {
|
|||
}): VNode[];
|
||||
/**
|
||||
* Custom remove token icon template.
|
||||
* @param {Object} scope - remove token icon slot's params.
|
||||
*/
|
||||
removetokenicon(): VNode[];
|
||||
removetokenicon(scope: {
|
||||
/**
|
||||
* Remove icon click event
|
||||
*/
|
||||
onClick(): void;
|
||||
}): VNode[];
|
||||
}
|
||||
/**
|
||||
* Defines valid emits in Chips component.
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<slot name="chip" :value="val">
|
||||
<span class="p-chips-token-label">{{ val }}</span>
|
||||
</slot>
|
||||
<slot name="removetokenicon">
|
||||
<slot name="removetokenicon" :onClick="(event) => removeItem(event, i)">
|
||||
<component :is="removeTokenIcon ? 'span' : 'TimesCircleIcon'" :class="['p-chips-token-icon', removeTokenIcon]" @click="removeItem($event, i)" aria-hidden="true" />
|
||||
</slot>
|
||||
</li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue