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

Configure system-wide control settings? #770

Open
jasonhjohnson opened this issue Nov 1, 2017 · 2 comments
Open

Configure system-wide control settings? #770

jasonhjohnson opened this issue Nov 1, 2017 · 2 comments

Comments

@jasonhjohnson
Copy link

Is it possible to configure system-wide settings for a particular control on application startup?

For example, instead of having to put k-no-records.bind="true" on every ak-grid just set it once globally?

Thanks,
Jason

@JeroenVinke
Copy link
Member

I'm not sure, not nicely anyway. What I would do is put the settings in a class, inject it and then bind it to k-options

Like

export class MyGridSettings {
  pagination = false;
}

@inject(MyGridSettings)
export class MyPage {
  constructor(settings) {
     this.defaultsettings = settings;
  }
}

<ak-grid k-options.bind="defaultsettings">

I would also glady accept a PR to specify defaults when initializing the bridge plugin from main.js

@JeroenVinke
Copy link
Member

By the way, k-options will provide defaults, which you can override with k-pagination="" for example

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