Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(TreeData): addItem should keep current sorted column #1558

Merged
merged 3 commits into from
Jun 6, 2024

Conversation

ghiscoding
Copy link
Owner

@ghiscoding ghiscoding commented Jun 5, 2024

  • prior to this PR, calling addItem(), or addItems(), was always resorting using the Tree Data initial sort because the method being called is the same for the first build of the Tree Data and/or adding an item. So when we're adding an item, we should really reuse any existing sort that may exist when resynching the flat/hierarchical and resorting them (we always need to resort whenever it changes because by SlickGrid doesn't support Tree Data, we only support it by keeping copies of both flat & hierarchical and then resort them whenever something changes)

brave_KNDYMGY8FW

- prior to this PR, calling `addItem()` (or `addItems()`) was always resorting using the Tree Data initial sort because the method being called is the same for the initial Tree Data first load and/or adding an item. So we should really reuse any existing current sort when resorting the updated tree.
Copy link

stackblitz bot commented Jun 5, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

codecov bot commented Jun 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.8%. Comparing base (7d4a769) to head (2fc3e50).

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #1558     +/-   ##
========================================
+ Coverage    99.8%   99.8%   +0.1%     
========================================
  Files         198     198             
  Lines       21722   21723      +1     
  Branches     7270    7271      +1     
========================================
+ Hits        21661   21662      +1     
  Misses         55      55             
  Partials        6       6             

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ghiscoding ghiscoding merged commit dc2a002 into master Jun 6, 2024
6 checks passed
@ghiscoding ghiscoding deleted the bugfix/tree-data-add-item-keep-sort-order branch June 6, 2024 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant