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

module options is not working #64

Closed
Diluka opened this issue Apr 10, 2019 · 2 comments
Closed

module options is not working #64

Diluka opened this issue Apr 10, 2019 · 2 comments
Assignees

Comments

@Diluka
Copy link
Contributor

Diluka commented Apr 10, 2019

It doesn't load options

static loadConfig(config: CrudModuleConfig = {}) {
CrudConfigService.load(config);
}

? new ValidationPipe({
...options,
groups: [group],
transform: false,
})

@Diluka
Copy link
Contributor Author

Diluka commented Apr 10, 2019

Too Bad

In jest test, CrudConfigService.config is always {} when access from helpers. But it has been set values when access directly from it.

Using Tests

https://gist.github.com/Diluka/de5e623ac3af7f934bbdc8e84c92811c

Suggestions

  • If it is unfinished feature, please keep it in feature/* branches.
  • Suggest to use lodash
    This can merge deeply when property is missing _.defaultsDeep(crudOptions, CrudConfigService.config);

@michaelyali
Copy link
Member

@Diluka please see the docs

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

2 participants