aurelia-kendoui-bridge icon indicating copy to clipboard operation
aurelia-kendoui-bridge copied to clipboard

Configure system-wide control settings?

Open jasonhjohnson opened this issue 7 years ago • 2 comments

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

jasonhjohnson avatar Nov 01 '17 13:11 jasonhjohnson

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 avatar Nov 02 '17 18:11 JeroenVinke

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

JeroenVinke avatar Nov 02 '17 18:11 JeroenVinke