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: register RowDetail and dispose of it only once #1253

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

ghiscoding
Copy link
Owner

The issue was because both the externalResources & extensionList are arrays and to make it easier, they both loop through their arrays when it's time to dispose (destroy) of them. However the RowDetailService was added to both arrays which was disposing of it twice instead of once. This PR fixes this by keeping RowDetail in the extensionList but without adding it to the externalResources array. The other thing to note is that it's better to keep it in extensionList since I already had code in place to get the RowDetail instance from that list as per this Example 21 code

get rowDetailInstance() {
// you can get the SlickGrid RowDetail plugin (addon) instance via 2 ways
// option 1
// return this.extensions.rowDetailView.instance || {};
// OR option 2
return this.aureliaGrid?.extensionService.getExtensionInstanceByName(ExtensionName.rowDetailView);
}

Copy link

stackblitz bot commented Aug 22, 2024

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

Copy link

codecov bot commented Aug 22, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 21.63%. Comparing base (c066730) to head (5039a40).
Report is 1 commits behind head on master.

Files Patch % Lines
...slickgrid/src/custom-elements/aurelia-slickgrid.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1253      +/-   ##
==========================================
- Coverage   21.66%   21.63%   -0.02%     
==========================================
  Files           8        8              
  Lines         933      934       +1     
  Branches      323      346      +23     
==========================================
  Hits          202      202              
- Misses        731      732       +1     

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

@ghiscoding ghiscoding merged commit d598c6d into master Aug 22, 2024
3 of 4 checks passed
@ghiscoding ghiscoding deleted the bugfix/row-detail-dispose-once branch August 22, 2024 00:33
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