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

feature(config): implement global module config via forRoot #1688

Merged
merged 1 commit into from
Jun 10, 2019
Merged

feature(config): implement global module config via forRoot #1688

merged 1 commit into from
Jun 10, 2019

Conversation

smhagit
Copy link
Contributor

@smhagit smhagit commented May 14, 2019

currently only the [messages] are supported

Change-Id: I772a95861ffa36353430123526a9f9e82fa0187e

What kind of change does this PR introduce? (check one with "x")

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior? (You can also link to an open issue here)
Currently the localization for the [messages] must be set in html for every ngx-datatable instance.
An already existing Issue from @fantoine last year=> #1602

What is the new behavior?
With this change, you can set the [messages] globally via Module.forRoot

// Import the Module with forRoot
NgxDatatableModule.forRoot({
      messages: {
        emptyMessage: 'No data to display',   // Message to show when array is presented, but contains no values
        totalMessage: 'total',                // Footer total message
        selectedMessage: 'selected'           // Footer selected message
      }
    })

Does this PR introduce a breaking change? (check one with "x")

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:

currently only the [messages] are supported

Change-Id: I772a95861ffa36353430123526a9f9e82fa0187e
@marjan-georgiev marjan-georgiev merged commit 175c698 into swimlane:master Jun 10, 2019
@marjan-georgiev
Copy link
Member

Nice feature, thanks! Will be released in 15.1.0

@conrado-l
Copy link

I think it would be a great idea to be able to set the cssClasses too, such as the pagination and sorting icons via forRoot, repeating the cssClasses input in every is pretty bad.

¡Thanks!

@hensleyrob
Copy link

Nice feature, thanks! Will be released in 15.1.0

I could use this as well, any timeline on the 15.1.0 release?

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.

4 participants