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 #980

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

ghiscoding
Copy link
Collaborator

@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 w/onSelectedRowsChanged not receiving correct caller prop Jan 17, 2024
@ghiscoding ghiscoding changed the title fix: regression w/onSelectedRowsChanged not receiving correct caller prop fix: regression onSelectedRowsChanged not receiving correct caller Jan 17, 2024
@ghiscoding ghiscoding merged commit ffbb335 into master Jan 17, 2024
2 checks passed
@ghiscoding ghiscoding deleted the bugfix/row-selection-caller branch January 17, 2024 19:21
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