Fixed #4977 - Improve performance of row expansion feature on DataTable (#4978)

* DataTable performance improvement (1)

* Refactor on DT performance

* Refactor

* Refactor

* Update RowExpansionDoc.vue

* Update RowExpansionDoc.vue

* Update RowExpansionDoc.vue
This commit is contained in:
Mert Sincan 2023-12-18 14:16:35 +00:00 committed by GitHub
parent f6c5cda987
commit fb1fb60eab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 674 additions and 467 deletions

View file

@ -368,7 +368,7 @@ const classes = {
rowgroupHeader: 'p-rowgroup-header',
rowGroupToggler: 'p-row-toggler p-link',
rowGroupTogglerIcon: 'p-row-toggler-icon',
row: ({ instance, props, rowData }) => {
row: ({ instance, props }) => {
let rowStyleClass = [];
if (props.selectionMode) {
@ -377,13 +377,13 @@ const classes = {
if (props.selection) {
rowStyleClass.push({
'p-highlight': instance.isSelected(rowData)
'p-highlight': instance.isSelected
});
}
if (props.contextMenuSelection) {
rowStyleClass.push({
'p-highlight-contextmenu': instance.isSelectedWithContextMenu(rowData)
'p-highlight-contextmenu': instance.isSelectedWithContextMenu
});
}