Refactor #3965 - DataTable sort fixes

pull/4041/head
Tuğçe Küçükoğlu 2023-06-07 17:04:02 +03:00
parent e55e2a2de9
commit d21216de3a
2 changed files with 6 additions and 5 deletions

View File

@ -464,10 +464,11 @@ export default {
if (
DomHandler.getAttribute(targetNode, 'data-p-sortable-column') === true ||
DomHandler.getAttribute(targetNode, 'data-pc-section') === 'headerTitle' ||
DomHandler.getAttribute(targetNode, 'data-pc-section') === 'headerContent' ||
DomHandler.getAttribute(targetNode, 'data-pc-section') === 'sortIcon' ||
DomHandler.getAttribute(targetNode.parentElement, 'data-pc-section') === 'sortIcon'
DomHandler.getAttribute(targetNode, 'data-pc-section') === 'headertitle' ||
DomHandler.getAttribute(targetNode, 'data-pc-section') === 'headercontent' ||
DomHandler.getAttribute(targetNode, 'data-pc-section') === 'sorticon' ||
DomHandler.getAttribute(targetNode.parentElement, 'data-pc-section') === 'sorticon' ||
DomHandler.getAttribute(targetNode.parentElement.parentElement, 'data-pc-section') === 'sorticon'
) {
DomHandler.clearSelection();

View File

@ -27,7 +27,7 @@
<component v-if="column.children && column.children.header" :is="column.children.header" :column="column" />
<span v-if="columnProp('header')" :class="cxo('headerTitle')" v-bind="getColumnPT('headerTitle')">{{ columnProp('header') }}</span>
<span v-if="columnProp('sortable')" v-bind="getColumnPT('sort')">
<component :is="(column.children && column.children.sorticon) || sortableColumnIcon" :sorted="sortState.sorted" :sortOrder="sortState.sortOrder" :class="cxo('sortIcon')" />
<component :is="(column.children && column.children.sorticon) || sortableColumnIcon" :sorted="sortState.sorted" :sortOrder="sortState.sortOrder" data-pc-section="sorticon" :class="cxo('sortIcon')" />
</span>
<span v-if="isMultiSorted()" :class="cxo('sortBadge')" v-bind="getColumnPT('sortBadge')">{{ getBadgeValue() }}</span>
<DTHeaderCheckbox