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

feat(core): add rowHighlightCssClass & highlightRow() to SlickGrid #1272

Merged
merged 1 commit into from Dec 20, 2023

Conversation

ghiscoding
Copy link
Owner

@ghiscoding ghiscoding commented Dec 20, 2023

  • remove previous highlightRowByMetadata() method in GridService, we can avoid using ItemMetaData altogether by adding a simple highlightRow() method directly in the SlickGrid core lib and also add rowHighlightCssClass grid option which will be animated by default but user could also disable the animation and/or even disable the fade out (remain highlighted)
  • this new approach simplifies the code a lot and doesn't require the use of ItemMetadata and calling multiple updateItem() and render() which is much better for performance
  • also fixes an issue that was previously happening when inserting multiple items before the highlight timer had time to finish, that was leaving multiple row highlighted when they shouldn't.
  • also fix potential mem leak found on some setTimeout not having any clearTimeout assigned which could cause potential mem leaks
  • fixes opened Angular-Slickgrid issue All items in grid appear highlighted after adding an item to the grid Angular-Slickgrid#1332

msedge_9JHSBZbK2A

- remove previous `highlightRowByMetadata()` method in GridService, we can avoid using ItemMetaData altogether by adding a simple `highlightRow()` method directly in the SlickGrid core lib and also add `rowHighlightCssClass` grid option which will be animated by default but user could also disable the animation and/or even disable the fade out (remain highlighted)
- also fix potential mem leak found on some `setTimeout` not having any `clearTimeout` assigned which could cause potential mem leaks
Copy link

codecov bot commented Dec 20, 2023

Codecov Report

Attention: 14 lines in your changes are missing coverage. Please review.

Comparison is base (14791e7) 86.71% compared to head (2e5926b) 87.17%.

Files Patch % Lines
packages/common/src/core/slickGrid.ts 68.19% 7 Missing ⚠️
packages/common/src/services/grid.service.ts 30.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1272      +/-   ##
==========================================
+ Coverage   86.71%   87.17%   +0.47%     
==========================================
  Files         197      197              
  Lines       21377    21366      -11     
  Branches     7107     7103       -4     
==========================================
+ Hits        18534    18624      +90     
+ Misses       2843     2742     -101     

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

@ghiscoding ghiscoding merged commit 31c38ad into master Dec 20, 2023
4 of 5 checks passed
@ghiscoding ghiscoding deleted the feat/grid-highlight-row branch December 20, 2023 00:13
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.

None yet

2 participants