Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
fix(base-entity-list): Add out event "selectedChange"
Browse files Browse the repository at this point in the history
  • Loading branch information
EndyKaufman committed Apr 25, 2018
1 parent f6898df commit 8b9c465
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions libs/@rucken/web/src/components/base/base-entity-list.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,15 @@ export class BaseEntityListComponent<TModel extends IModel> implements IBaseEnti
@Input()
strings: any;
@Input()
selected: TModel[] = [];
set selected(selected: TModel[]) {
this._selected = selected;
this.selectedChange.emit(this._selected);
}
get selected() {
return this._selected;
}
@Output()
selectedChange: EventEmitter<TModel[]> = new EventEmitter<TModel[]>();
@Input()
readonly: boolean;
@Input()
Expand All @@ -37,6 +45,7 @@ export class BaseEntityListComponent<TModel extends IModel> implements IBaseEnti
filter: IEntityGridFilter = { searchText: '', sort: '-id' };

private _mockedItems: TModel[];
private _selected: TModel[] = [];

constructor(
public repository: Repository<TModel>,
Expand Down Expand Up @@ -332,7 +341,7 @@ export class BaseEntityListComponent<TModel extends IModel> implements IBaseEnti
modal.hide();
},
error => this.onAppendFromGridError(modal, error)
);
);
} else {
modal.hide();
}
Expand Down

0 comments on commit 8b9c465

Please # to comment.