Refactor #3832 - DataTable & TreeTable sort icon bug fixes
parent
a230948d1b
commit
0a31a8e3d5
|
@ -20,7 +20,7 @@
|
||||||
<component v-if="column.children && column.children.header" :is="column.children.header" :column="column" />
|
<component v-if="column.children && column.children.header" :is="column.children.header" :column="column" />
|
||||||
<span v-if="columnProp('header')" class="p-column-title">{{ columnProp('header') }}</span>
|
<span v-if="columnProp('header')" class="p-column-title">{{ columnProp('header') }}</span>
|
||||||
<span v-if="columnProp('sortable')">
|
<span v-if="columnProp('sortable')">
|
||||||
<component :is="(column.children && column.children.sorticon) || sortableColumnIcon" :sorted="sortState[0].sorted" :sortOrder="sortState[0].sortOrder" class="p-sortable-column-icon" />
|
<component :is="(column.children && column.children.sorticon) || sortableColumnIcon" :sorted="sortState.sorted" :sortOrder="sortState.sortOrder" class="p-sortable-column-icon" />
|
||||||
</span>
|
</span>
|
||||||
<span v-if="isMultiSorted()" class="p-sortable-column-badge">{{ getBadgeValue() }}</span>
|
<span v-if="isMultiSorted()" class="p-sortable-column-badge">{{ getBadgeValue() }}</span>
|
||||||
<DTHeaderCheckbox v-if="columnProp('selectionMode') === 'multiple' && filterDisplay !== 'row'" :checked="allRowsSelected" @change="onHeaderCheckboxChange" :disabled="empty" :headerCheckboxIconTemplate="headerCheckboxIconTemplate" />
|
<DTHeaderCheckbox v-if="columnProp('selectionMode') === 'multiple' && filterDisplay !== 'row'" :checked="allRowsSelected" @change="onHeaderCheckboxChange" :disabled="empty" :headerCheckboxIconTemplate="headerCheckboxIconTemplate" />
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<component v-if="column.children && column.children.header" :is="column.children.header" :column="column" />
|
<component v-if="column.children && column.children.header" :is="column.children.header" :column="column" />
|
||||||
<span v-if="columnProp('header')" class="p-column-title">{{ columnProp('header') }}</span>
|
<span v-if="columnProp('header')" class="p-column-title">{{ columnProp('header') }}</span>
|
||||||
<span v-if="columnProp('sortable')">
|
<span v-if="columnProp('sortable')">
|
||||||
<component :is="(column.children && column.children.sorticon) || sortableColumnIcon" :sorted="sortState[0].sorted" :sortOrder="sortState[0].sortOrder" class="p-sortable-column-icon" />
|
<component :is="(column.children && column.children.sorticon) || sortableColumnIcon" :sorted="sortState.sorted" :sortOrder="sortState.sortOrder" class="p-sortable-column-icon" />
|
||||||
</span>
|
</span>
|
||||||
<span v-if="isMultiSorted()" class="p-sortable-column-badge">{{ getMultiSortMetaIndex() + 1 }}</span>
|
<span v-if="isMultiSorted()" class="p-sortable-column-badge">{{ getMultiSortMetaIndex() + 1 }}</span>
|
||||||
</th>
|
</th>
|
||||||
|
@ -167,12 +167,10 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return [
|
return {
|
||||||
{
|
sorted,
|
||||||
sorted,
|
sortOrder
|
||||||
sortOrder
|
};
|
||||||
}
|
|
||||||
];
|
|
||||||
},
|
},
|
||||||
sortableColumnIcon() {
|
sortableColumnIcon() {
|
||||||
const { sorted, sortOrder } = this.sortState;
|
const { sorted, sortOrder } = this.sortState;
|
||||||
|
|
Loading…
Reference in New Issue