Refactor #5071
parent
adadbf27c4
commit
54ea411d76
|
@ -37,6 +37,7 @@
|
|||
:disabled="empty"
|
||||
:headerCheckboxIconTemplate="column.children && column.children.headercheckboxicon"
|
||||
:column="column"
|
||||
:unstyled="unstyled"
|
||||
:pt="pt"
|
||||
/>
|
||||
<DTColumnFilter
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<Checkbox :modelValue="checked" :binary="true" :disabled="$attrs.disabled" :aria-label="checkboxAriaLabel" @change="onChange" :pt="getColumnPT('rowCheckbox')">
|
||||
<Checkbox :modelValue="checked" :binary="true" :disabled="$attrs.disabled" :aria-label="checkboxAriaLabel" @change="onChange" :unstyled="unstyled" :pt="getColumnPT('rowCheckbox')">
|
||||
<template #icon="slotProps">
|
||||
<component v-if="rowCheckboxIconTemplate" :is="rowCheckboxIconTemplate" :checked="slotProps.checked" :class="slotProps.class" />
|
||||
<CheckIcon v-else-if="!rowCheckboxIconTemplate && slotProps.checked" :class="slotProps.class" v-bind="getColumnPT('rowCheckbox.icon')" />
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<RadioButton :modelValue="checked" :disabled="$attrs.disabled" :name="name" @change="onChange" :pt="getColumnPT('rowRadiobutton')" />
|
||||
<RadioButton :modelValue="checked" :disabled="$attrs.disabled" :name="name" @change="onChange" :unstyled="unstyled" :pt="getColumnPT('rowRadiobutton')" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -20,6 +20,10 @@ export default {
|
|||
index: {
|
||||
type: Number,
|
||||
default: null
|
||||
},
|
||||
unstyled: {
|
||||
type: Boolean,
|
||||
default: undefined
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
@constraint-add="$emit('constraint-add', $event)"
|
||||
@constraint-remove="$emit('constraint-remove', $event)"
|
||||
@apply-click="$emit('apply-click', $event)"
|
||||
:unstyled="unstyled"
|
||||
:pt="pt"
|
||||
/>
|
||||
</template>
|
||||
|
@ -48,7 +49,7 @@
|
|||
:class="getFilterColumnHeaderClass(col)"
|
||||
v-bind="{ ...getColumnPT(col, 'root', i), ...getColumnPT(col, 'headerCell', i) }"
|
||||
>
|
||||
<DTHeaderCheckbox v-if="columnProp(col, 'selectionMode') === 'multiple'" :checked="allRowsSelected" :disabled="empty" @change="$emit('checkbox-change', $event)" :column="col" :pt="pt" />
|
||||
<DTHeaderCheckbox v-if="columnProp(col, 'selectionMode') === 'multiple'" :checked="allRowsSelected" :disabled="empty" @change="$emit('checkbox-change', $event)" :column="col" :unstyled="unstyled" :pt="pt" />
|
||||
<DTColumnFilter
|
||||
v-if="col.children && col.children.filter"
|
||||
:field="columnProp(col, 'filterField') || columnProp(col, 'field')"
|
||||
|
@ -118,6 +119,7 @@
|
|||
@constraint-add="$emit('constraint-add', $event)"
|
||||
@constraint-remove="$emit('constraint-remove', $event)"
|
||||
@apply-click="$emit('apply-click', $event)"
|
||||
:unstyled="unstyled"
|
||||
:pt="pt"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
@ -68,7 +68,16 @@
|
|||
></span>
|
||||
<slot name="header" :value="modelValue" :options="visibleOptions"></slot>
|
||||
<div v-if="(showToggleAll && selectionLimit == null) || filter" :class="cx('header')" v-bind="ptm('header')">
|
||||
<Checkbox v-if="showToggleAll && selectionLimit == null" :modelValue="allSelected" :binary="true" :disabled="disabled" :aria-label="toggleAllAriaLabel" @change="onToggleAll" :pt="getHeaderCheckboxPTOptions('headerCheckbox')">
|
||||
<Checkbox
|
||||
v-if="showToggleAll && selectionLimit == null"
|
||||
:modelValue="allSelected"
|
||||
:binary="true"
|
||||
:disabled="disabled"
|
||||
:aria-label="toggleAllAriaLabel"
|
||||
@change="onToggleAll"
|
||||
:unstyled="unstyled"
|
||||
:pt="getHeaderCheckboxPTOptions('headerCheckbox')"
|
||||
>
|
||||
<template #icon="slotProps">
|
||||
<component v-if="$slots.headercheckboxicon" :is="$slots.headercheckboxicon" :checked="slotProps.checked" :class="slotProps.class" />
|
||||
<component v-else-if="slotProps.checked" :is="checkboxIcon ? 'span' : 'CheckIcon'" :class="[slotProps.class, { [checkboxIcon]: slotProps.checked }]" v-bind="getHeaderCheckboxPTOptions('headerCheckbox.icon')" />
|
||||
|
@ -131,7 +140,7 @@
|
|||
:data-p-focused="focusedOptionIndex === getOptionIndex(i, getItemOptions)"
|
||||
:data-p-disabled="isOptionDisabled(option)"
|
||||
>
|
||||
<Checkbox :modelValue="isSelected(option)" :binary="true" :pt="getCheckboxPTOptions(option, getItemOptions, i, 'itemCheckbox')">
|
||||
<Checkbox :modelValue="isSelected(option)" :binary="true" :unstyled="unstyled" :pt="getCheckboxPTOptions(option, getItemOptions, i, 'itemCheckbox')">
|
||||
<template #icon="slotProps">
|
||||
<component v-if="$slots.itemcheckboxicon" :is="$slots.itemcheckboxicon" :checked="slotProps.checked" :class="slotProps.class" />
|
||||
<component
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
:selectionKeys="selectionKeys"
|
||||
@checkbox-change="onCheckboxChange"
|
||||
:loadingMode="loadingMode"
|
||||
:pt="pt"
|
||||
:unstyled="unstyled"
|
||||
:pt="pt"
|
||||
></TreeNode>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<component v-else :is="node.collapsedIcon ? 'span' : 'ChevronRightIcon'" :class="cx('togglerIcon')" v-bind="getPTOptions('togglerIcon')" />
|
||||
</template>
|
||||
</button>
|
||||
<Checkbox v-if="checkboxMode" :modelValue="checked" :binary="true" :class="cx('nodeCheckbox')" :pt="getPTOptions('nodeCheckbox')" :data-p-checked="checked" :data-p-partialchecked="partialChecked">
|
||||
<Checkbox v-if="checkboxMode" :modelValue="checked" :binary="true" :class="cx('nodeCheckbox')" :unstyled="unstyled" :pt="getPTOptions('nodeCheckbox')" :data-p-checked="checked" :data-p-partialchecked="partialChecked">
|
||||
<template #icon="slotProps">
|
||||
<component v-if="templates['checkboxicon']" :is="templates['checkboxicon']" :checked="slotProps.checked" :partialChecked="partialChecked" :class="slotProps.class" />
|
||||
<component v-else :is="checked ? 'CheckIcon' : partialChecked ? 'MinusIcon' : null" :class="slotProps.class" v-bind="getPTOptions('nodeCheckbox.icon')" />
|
||||
|
@ -51,6 +51,7 @@
|
|||
:selectionMode="selectionMode"
|
||||
:selectionKeys="selectionKeys"
|
||||
@checkbox-change="propagateUp"
|
||||
:unstyled="unstyled"
|
||||
:pt="pt"
|
||||
/>
|
||||
</ul>
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
:binary="true"
|
||||
:class="cx('rowCheckbox')"
|
||||
@change="toggleCheckbox"
|
||||
:unstyled="unstyled"
|
||||
:pt="getColumnCheckboxPT('rowCheckbox')"
|
||||
:data-p-highlight="checked"
|
||||
:data-p-checked="checked"
|
||||
|
|
|
@ -68,6 +68,7 @@
|
|||
@column-click="onColumnHeaderClick"
|
||||
@column-resizestart="onColumnResizeStart"
|
||||
:index="i"
|
||||
:unstyled="unstyled"
|
||||
:pt="pt"
|
||||
></TTHeaderCell>
|
||||
</template>
|
||||
|
@ -101,6 +102,7 @@
|
|||
@node-toggle="onNodeToggle"
|
||||
@node-click="onNodeClick"
|
||||
@checkbox-change="onCheckboxChange"
|
||||
:unstyled="unstyled"
|
||||
:pt="pt"
|
||||
></TTRow>
|
||||
</template>
|
||||
|
@ -113,7 +115,7 @@
|
|||
<tfoot v-if="hasFooter" :class="cx('tfoot')" role="rowgroup" v-bind="ptm('tfoot')">
|
||||
<tr role="row" v-bind="ptm('footerRow')">
|
||||
<template v-for="(col, i) of columns" :key="columnProp(col, 'columnKey') || columnProp(col, 'field') || i">
|
||||
<TTFooterCell v-if="!columnProp(col, 'hidden')" :column="col" :index="i" :pt="pt"></TTFooterCell>
|
||||
<TTFooterCell v-if="!columnProp(col, 'hidden')" :column="col" :index="i" :unstyled="unstyled" :pt="pt"></TTFooterCell>
|
||||
</template>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
@checkbox-toggle="toggleCheckbox"
|
||||
:index="i"
|
||||
:loadingMode="loadingMode"
|
||||
:unstyled="unstyled"
|
||||
:pt="pt"
|
||||
></TTBodyCell>
|
||||
</template>
|
||||
|
@ -57,6 +58,7 @@
|
|||
@node-toggle="$emit('node-toggle', $event)"
|
||||
@node-click="$emit('node-click', $event)"
|
||||
@checkbox-change="onCheckboxChange"
|
||||
:unstyled="unstyled"
|
||||
:pt="pt"
|
||||
/>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue