Skip to content

Commit

Permalink
fix(gridOptions): use this.gridOptions in bind fn
Browse files Browse the repository at this point in the history
using the first arg in the bind method looks at the parent context, which might not be the view-model with the `gridOptions`. For example in a repeat.for, the view-model properties are not available, which can be wrong if aurelia slickgrid in a repeat.for. Using `this.gridOptions` assures us we are using the options that are bound
  • Loading branch information
jmzagorski committed Apr 27, 2018
1 parent 2bb0de7 commit 48de363
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export class AureliaSlickgridCustomElement {
*/
bind(binding: any, contexts: any) {
// 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 48de363

Please sign in to comment.