Fixed #4398 - Column: rowtogglericon slot does not expose p-row-toggler-icon class

pull/4402/head
Tuğçe Küçükoğlu 2023-09-06 14:26:20 +03:00
parent 2bb51f40b1
commit 2619ae5b4e
2 changed files with 5 additions and 1 deletions

View File

@ -892,6 +892,10 @@ export interface ColumnSlots {
* @param {Object} scope - row toggler icon slot's params.
*/
rowtogglericon(scope: {
/**
* Style class of the row toggler icon.
*/
class: string;
/**
* Current row expanded state.
*/

View File

@ -63,7 +63,7 @@
v-bind="getColumnPT('rowToggler')"
data-pc-group-section="rowactionbutton"
>
<component v-if="column.children && column.children.rowtogglericon" :is="column.children.rowtogglericon" :rowExpanded="isRowExpanded" />
<component v-if="column.children && column.children.rowtogglericon" :is="column.children.rowtogglericon" :class="cx('rowTogglerIcon')" :rowExpanded="isRowExpanded" />
<template v-else>
<span v-if="isRowExpanded && expandedRowIcon" :class="[cx('rowTogglerIcon'), expandedRowIcon]" />
<ChevronDownIcon v-else-if="isRowExpanded && !expandedRowIcon" :class="cx('rowTogglerIcon')" v-bind="getColumnPT('rowTogglerIcon')" />