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

Global default module configuration #1602

Closed
fantoine opened this issue Nov 19, 2018 · 1 comment
Closed

Global default module configuration #1602

fantoine opened this issue Nov 19, 2018 · 1 comment

Comments

@fantoine
Copy link

I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[X] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

Current behavior

Currently, if we want to add common settings on datatables (like localization), we have to fill them on each datatable instance.

Expected behavior

It could be easier and more maintainable to be able to set default settings when importing the datatable module.

Reproduction of the problem

For instance, we often see this kind of behavior in Angular modules:

NgxDatatableModule.forRoot({
    messages: {
        emptyMessage: 'Aucune donnée à afficher',
        totalMessage: 'total',
    }
})

What is the motivation / use case for changing the behavior?

Well... I think it's a wrong pattern to have to duplicate same configuration on each instance.

Please tell us about your environment:

Ubuntu, WebStorm, NPM...

  • Table version:

14.0.0

  • Angular version:

7.0.4

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

all

  • Language: [all | TypeScript X.X | ES6/7 | ES5]

all

@marjan-georgiev
Copy link
Member

Merged the PR! Will be released in 15.1.0

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