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(composite): onSave always include last dataContext on few inserts #1271

Merged
merged 1 commit into from Dec 19, 2023

Conversation

ghiscoding
Copy link
Owner

  • fixes issues reported in Angular-Slickgrid: Incorrect dataContext is passed in onSave callback using composite editor Angular-Slickgrid#1333
  • prior to the fix, only the first item inserted had the correct dataContext argument provided to the onSave, any other inserts were resolving to another unrelated data context
  • to fix this issue, we'll get the updated item right after it's been called by the onAddNewRow SlickEvent, which is the event being called after all editors are valid. Note however that an inserted item can also have an optional insertNewId which is taken care of with this fix as well

Copy link

codecov bot commented Dec 19, 2023

Codecov Report

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

Comparison is base (701da75) 86.71% compared to head (76d2ab8) 86.71%.

Files Patch % Lines
...-component/src/slick-composite-editor.component.ts 90.91% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1271      +/-   ##
==========================================
- Coverage   86.71%   86.71%   -0.00%     
==========================================
  Files         197      197              
  Lines       21374    21377       +3     
  Branches     7103     7107       +4     
==========================================
+ Hits        18532    18534       +2     
- Misses       2842     2843       +1     

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

@ghiscoding ghiscoding merged commit 14791e7 into master Dec 19, 2023
5 checks passed
@ghiscoding ghiscoding deleted the bugfix/composite-editor-insert-multiple-items branch December 19, 2023 18:49
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