Skip to content

Commit

Permalink
fix(grid): use this.gridOptions in bind & remove aurelia args
Browse files Browse the repository at this point in the history
binding.gridOptions may not be the view model. this.gridOptions will always be what the user passed in
  • Loading branch information
jmzagorski authored May 2, 2018
2 parents 2bb0de7 + 0a3a4cf commit 3bd2d90
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions aurelia-slickgrid/src/aurelia-slickgrid/aurelia-slickgrid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,9 @@ export class AureliaSlickgridCustomElement {
}));
}

/**
* Keep original value(s) that could be passed by the user ViewModel.
* If nothing was passed, it will default to first option of select
*/
bind(binding: any, contexts: any) {
bind() {
// get the grid options (priority is Global Options first, then user option which could overwrite the Global options)
this.gridOptions = { ...GlobalGridOptions, ...binding.gridOptions };
this.gridOptions = { ...GlobalGridOptions, ...this.gridOptions };

// Wrap each editor class in the Factory resolver so consumers of this library can use
// dependency injection. Aurelia will resolve all dependencies when we pass the container
Expand Down

0 comments on commit 3bd2d90

Please sign in to comment.