Chip item pt fixes

This commit is contained in:
tugcekucukoglu 2024-05-15 10:35:36 +03:00
parent 13107cc7c0
commit 66bd931082
17 changed files with 72 additions and 72 deletions

View file

@ -134,12 +134,12 @@ export interface MultiSelectPassThroughOptions {
/**
* Used to pass attributes to the chip's DOM element.
*/
chip?: MultiSelectPassThroughOptionType;
chipItem?: MultiSelectPassThroughOptionType;
/**
* Used to pass attributes to the Chip.
* @see {@link ChipPassThroughOptions}
*/
pcChipLabel?: ChipPassThroughOptions<MultiSelectSharedPassThroughMethodOptions>;
pcChip?: ChipPassThroughOptions<MultiSelectSharedPassThroughMethodOptions>;
/**
* Used to pass attributes to the chip icon's DOM element.
*/

View file

@ -30,10 +30,10 @@
{{ label || 'empty' }}
</template>
<template v-else-if="display === 'chip'">
<span v-for="item of chipSelectedItems" :key="getLabelByValue(item)" :class="cx('chip')" v-bind="ptm('chip')">
<span v-for="item of chipSelectedItems" :key="getLabelByValue(item)" :class="cx('chipItem')" v-bind="ptm('chipItem')">
<slot name="chip" :value="item" :removeCallback="(event) => removeOption(event, item)">
<!-- TODO: removetokenicon and removeTokenIcon deprecated since v4.0. Use chipicon slot and chipIcon prop-->
<Chip :class="cx('pcChipLabel')" :label="getLabelByValue(item)" :removeIcon="chipIcon || removeTokenIcon" removable :unstyled="unstyled" @remove="removeOption($event, item)" :pt="ptm('pcChipLabel')">
<Chip :class="cx('pcChip')" :label="getLabelByValue(item)" :removeIcon="chipIcon || removeTokenIcon" removable :unstyled="unstyled" @remove="removeOption($event, item)" :pt="ptm('pcChip')">
<template #removeicon>
<slot :name="$slots.chipicon ? 'chipicon' : 'removetokenicon'" :class="cx('chipIcon')" :item="item" :removeCallback="(event) => removeOption(event, item)" />
</template>

View file

@ -13,8 +13,8 @@ export enum MultiSelectClasses {
root = 'p-multiselect',
labelContainer = 'p-multiselect-label-container',
label = 'p-multiselect-label',
chip = 'p-multiselect-chip',
pcChipLabel = 'p-multiselect-chip-label',
chipItem = 'p-multiselect-chip-item',
pcChip = 'p-multiselect-chip',
chipIcon = 'p-multiselect-chip-icon',
dropdown = 'p-multiselect-dropdown',
loadingIcon = 'p-multiselect-loading-icon',

View file

@ -218,8 +218,8 @@ const classes = {
'p-multiselect-label-empty': !props.placeholder && (!props.modelValue || props.modelValue.length === 0)
}
],
chip: 'p-multiselect-chip',
pcChipLabel: 'p-multiselect-chip-label',
chipItem: 'p-multiselect-chip-item',
pcChip: 'p-multiselect-chip',
chipIcon: 'p-multiselect-chip-icon',
dropdown: 'p-multiselect-dropdown',
loadingIcon: 'p-multiselect-loading-icon',