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: registered external resouces should keep singleton ref #1242

Merged
merged 4 commits into from
Dec 2, 2023

Conversation

ghiscoding
Copy link
Owner

  • external resources can be provided through the grid options, but these options are sometime deep copied and that might have the side effect of losing the singleton ref of the instantiate services/resources, instead we can simply keep these singleton refs before any grid options merge can happen and that is in the constructor before the grid initializes and before the grid options are merged and sometime deep copied with global options

- external resources can be provided through the grid options, but these options are sometime deep copied and that might have the side effect of losing the singleton ref of the instantiate services/resources, instead we can simply keep these singleton refs before any grid options merge can happen and that is in the constructor before the grid initializes and before the grid options are merged and sometime deep copied with global options
- add `registerExternalResources` method to push extra external resources
- rename grid option (deprecate previous name) `registerExternalResources` because it's confusing with the method name and an option shouldn't be named with something that sound like an execution
- add `resetExternalResources()` method but that is mostly useful for unit tests
Copy link

codecov bot commented Dec 1, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d57463e) 100.00% compared to head (ea8ce74) 100.00%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #1242   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          246       246           
  Lines        17293     17305   +12     
  Branches      6254      6257    +3     
=========================================
+ Hits         17293     17305   +12     

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

@ghiscoding ghiscoding merged commit adf2054 into master Dec 2, 2023
5 checks passed
@ghiscoding ghiscoding deleted the bugfix/registered-resources-deep-copied branch December 2, 2023 01:39
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