Skip to content

Conversation

MayaKirova
Copy link
Contributor

Closes #16146

Split pipes in two, where one does the merging and the other tracks active rows and unmerges within related merge sequences.

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them

@MayaKirova MayaKirova added ❌ status: awaiting-test PRs awaiting manual verification grid labels Sep 26, 2025
@MayaKirova MayaKirova changed the base branch from master to 20.1.x September 26, 2025 09:34
@dkamburov
Copy link
Contributor

Openned rowPinning sample and pinned a row:
image
Also when I pin a row from cell merge sample I'm getting the following violation:
image

@MayaKirova
Copy link
Contributor Author

@dkamburov First one, I was not able to reproduce:
rowpin

Are you sure you have the latest changes in the branch or are there any additional steps needed to reproduce?

Second one is a sample issue. Because of the way the data is added, the same object refs are used in the grid sample:

for (let i = 1; i <= 600_000; i++) {
            const rnd = Math.floor(Math.random() * length);
            allData.push(INVOICE_DATA[rnd]);
        }

Hence, duplicate keys.

I fixed it in the sample.

@dkamburov
Copy link
Contributor

@MayaKirova appologize on the non reproducible sample: I do had some changes on that sample(didn't noticed them at first as they were from my previous testing on the cell merging):
image

[cellMergeMode]="'always'" to the grid and [merge]="true" to the columns

Copy link
Member

@mddragnev mddragnev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional, issues I found:

  1. If you click on any of the headers in the dev sample an error is thrown.
Screenshot 2025-09-29 at 4 01 33 pm
  1. Go to the performance project and enable the merging on all columns. Run the performance samples using npm run start:performance and go to the grid with 1 million records. Sort the Position column. Click on the first cell of the Registered column. An error is thrown with maximum callstack exceeded.
Screenshot 2025-09-29 at 3 53 58 pm 3. For 1 million records on the performance sample, it takes 4 to 5 seconds to merge the cells. Sometimes the browser crashes out of memory. This makes all other features that are pipe related to feel very slow.

activeRowIndexes = activeRowIndexes.map(x => x - this.grid.pinnedRecordsCount);
}
const result = DataUtil.merge(cloneArray(collection), colsToMerge, mergeStrategy, activeRowIndexes, this.grid);
activeRowIndexes = activeRowIndexes.filter((val, idx, arr) => arr.indexOf(val) === idx).filter(x => !isNaN(x));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is only removing the duplicates can we use a set? Probably, it would be too much of a work to refactor everywhere activeRowIndexes is used but you can use it here like :

Array.from(new Set(activeRowIndexes)).filter(x => !isNan(x));

}
});
});
const uniqueRoots = rootsToUpdate.filter((val, idx, arr) => arr.indexOf(val) === idx);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rootsToUpdate can be a Set here as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes are applied and issues should be solved. The performance comments is up for discussion I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve performance of navigation when there are merged cells.
4 participants