CascadeSelect: Icon slots option updates
parent
c90828dfd0
commit
33cc712e94
|
@ -496,7 +496,12 @@ export interface CascadeSelectSlots {
|
|||
/**
|
||||
* Custom option group icon template.
|
||||
*/
|
||||
optiongroupicon(): VNode[];
|
||||
optiongroupicon(scope: {
|
||||
/**
|
||||
* Style class of the icon.
|
||||
*/
|
||||
class: string;
|
||||
}): VNode[];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<component v-if="templates['option']" :is="templates['option']" :option="processedOption.option" :selected="isOptionGroup(processedOption) ? false : isOptionSelected(processedOption)" />
|
||||
<span v-else :class="cx('optionText')" v-bind="getPTOptions(processedOption, index, 'optionText')">{{ getOptionLabelToRender(processedOption) }}</span>
|
||||
<template v-if="isOptionGroup(processedOption)">
|
||||
<component v-if="templates['optiongroupicon']" :is="templates['optiongroupicon']" aria-hidden="true" />
|
||||
<component v-if="templates['optiongroupicon']" :is="templates['optiongroupicon']" :class="cx('groupIcon')" />
|
||||
<span v-else-if="optionGroupIcon" :class="[cx('groupIcon'), optionGroupIcon]" aria-hidden="true" v-bind="getPTOptions(processedOption, index, 'groupIcon')" />
|
||||
<AngleRightIcon v-else :class="cx('groupIcon')" aria-hidden="true" v-bind="getPTOptions(processedOption, index, 'groupIcon')" />
|
||||
</template>
|
||||
|
@ -54,9 +54,9 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import BaseComponent from '@primevue/core/basecomponent';
|
||||
import { nestedPosition } from '@primeuix/utils/dom';
|
||||
import { resolveFieldData, isNotEmpty } from '@primeuix/utils/object';
|
||||
import { isNotEmpty, resolveFieldData } from '@primeuix/utils/object';
|
||||
import BaseComponent from '@primevue/core/basecomponent';
|
||||
import AngleRightIcon from '@primevue/icons/angleright';
|
||||
import Ripple from 'primevue/ripple';
|
||||
|
||||
|
|
Loading…
Reference in New Issue