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(select): make a collection array copy to avoid change by ref #595

Merged
merged 5 commits into from
Oct 1, 2020

Conversation

ghiscoding
Copy link
Owner

  • when using "addBlankEntry" or "addCustomFirstEntry", the SelectFilter was affecting SelectEditor (and vice versa) because the collection was used by ref, so to fix this we can just do a copy of the collection before dealing with it

Ghislain Beaulac added 2 commits October 1, 2020 11:28
- when using "addBlankEntry" or "addCustomFirstEntry", the SelectFilter was affecting SelectEditor (and vice versa) because the collection was used by ref, so to fix this we can just do a copy of the collection before dealing with it
@codecov
Copy link

codecov bot commented Oct 1, 2020

Codecov Report

Merging #595 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #595   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          149       149           
  Lines         9939      9945    +6     
  Branches      3513      3514    +1     
=========================================
+ Hits          9939      9945    +6     
Impacted Files Coverage Δ
.../modules/angular-slickgrid/editors/selectEditor.ts 100.00% <100.00%> (ø)
.../modules/angular-slickgrid/filters/selectFilter.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9e3acdc...db5d27f. Read the comment docs.

Ghislain Beaulac and others added 3 commits October 1, 2020 12:14
- don't do it on the SelectFilter because that one gets loaded with the grid and it's better to keep using the array reference, so we'll make a collection copy only in the SlickEditor
@ghiscoding ghiscoding merged commit 4d6a395 into master Oct 1, 2020
@ghiscoding ghiscoding deleted the bugfix/select-editor-collection-copy branch October 1, 2020 18:28
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

1 participant