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

Specific config kills general (default) config #69

Open
poshest opened this issue Jul 1, 2017 · 0 comments
Open

Specific config kills general (default) config #69

poshest opened this issue Jul 1, 2017 · 0 comments

Comments

@poshest
Copy link

poshest commented Jul 1, 2017

I have some default config thus:

ScrollBarsProvider.defaults = {
...
, "mouseWheel": {
        "scrollAmount": 100 
      , "preventDefault": true
      ...
   }
...
}

Then in a specific instance I want to override "preventDefault": false, but leave all of the other settings, such as "scrollAmount": 100 intact.

Your config merge routine in the render function seems to intelligently merge config in the way I want, but only at the "top" level of the config object. Nested "general" objects are just replaced whole by the "specific" objects. Eg scrollAmount in the above example is killed.

Couldn't you just use an angular.merge in render? I note that it has been just freshly deprecated in 1.6.5, but as they say, angular.merge "will not be removed in the 1.x lifecycle".

Thanks!

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

No branches or pull requests

1 participant