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

Fixes issue where deepmerge concatenates arrays inside DEFAULT_CONFIG #496

Merged
merged 1 commit into from
Jan 19, 2019

Conversation

jhou
Copy link
Contributor

@jhou jhou commented Jan 18, 2019

... instead of replacing them.

Description

provides deepmerge with a function to replace its typical array merging behavior with a function that overwrites the destination array with a copy of the source array instead of concatenating the two.
Documentation for that feature here: https://www.npmjs.com/package/deepmerge#arraymerge

Motivation and Context

Without this fix, the searchFields config will always have [ 'label', 'value'] plus whatever config the user passes in, making it impossible to NOT search both label and value
#495

How Has This Been Tested?

Tests included in PR. Basically, attempt to type value entries into the search input, and make sure there are no results.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project. (i hope)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@jshjohnson
Copy link
Collaborator

Thanks for this :)

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

2 participants