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: regression onSelectedRowsChanged not receiving correct caller #1341

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

ghiscoding
Copy link
Owner

@ghiscoding ghiscoding commented Jan 17, 2024

  • a regression was introduced when dropping jQuery, the SlickEvent structure changed in the notify function. Previously a SlickEvent would accept a CustomEvent directly and the previous code was expecting that event to exists and override its CustomEvent detail, however the newer approach is to always use a SlickEventData and no longer use the CustomEvent directly and this caused the regression since the SlickEventData doesn't have a detail property but rather something like this SlickEventData { event: { detail } }
  • the fix is to simply create a CustomEvent with { detail: caller } which we then pass to the SlickEventData constructor so that our caller isn't lost and rather reused later when triggered by onSelectedRowsChanged

below is where it changed in SlickGrid slick.core.js file (we can see on the right side the new behavior is to always convert to a SlickEventData and that caused the regression)

image

…aller` prop

- a regression was introduced when dropping jQuery, the SlickEvent structure changed in the `notify` function. Previously a SlickEvent would accept a CustomEvent directly and the previous code was expecting that event to exists and override its CustomEvent `detail`, however the newer approach is to always use a SlickEventData and no longer use the CustomEvent directly and this caused the regression since the SlickEventData doesn't have a `detail` property but rather something like this `SlickEventData { event: { detail } }`
@ghiscoding ghiscoding changed the title fix: regression with onSelectedRowsChanged not receiving correct `c… fix: regression onSelectedRowsChanged not receiving correct caller Jan 17, 2024
@ghiscoding ghiscoding merged commit 03cad4a into master Jan 17, 2024
3 checks passed
@ghiscoding ghiscoding deleted the bugfix/row-selection-caller branch January 17, 2024 19:21
Copy link

codecov bot commented Jan 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d9c714c) 99.4% compared to head (6c77386) 99.4%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #1341     +/-   ##
========================================
- Coverage    99.4%   99.4%   -0.0%     
========================================
  Files         198     198             
  Lines       21286   21284      -2     
  Branches     7099    7099             
========================================
- Hits        21146   21144      -2     
  Misses        140     140             

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

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.

2 participants