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

Merged
merged 6 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 5 commits October 1, 2020 11:18
- 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
- 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
@codecov
Copy link

codecov bot commented Oct 1, 2020

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##            master      #135    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files          196       196            
  Lines        11245     11251     +6     
  Branches      3684      3816   +132     
==========================================
+ Hits         11245     11251     +6     
Impacted Files Coverage Δ
packages/common/src/editors/selectEditor.ts 100.00% <100.00%> (ø)
packages/common/src/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 66effcf...b48d8db. Read the comment docs.

@ghiscoding ghiscoding merged commit 3237133 into master Oct 1, 2020
@ghiscoding ghiscoding deleted the bugfix/select-editor-collection-copy branch October 1, 2020 19:38
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