Skip to content

Commit

Permalink
Do not open the modal before the schema is loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
HDinger committed Dec 13, 2019
1 parent 74f8fcb commit dd2d200
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frontend/src/app/modules/grids/grid/add-widget.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ export class GridAddWidgetService {

private select(area:GridArea) {
return new Promise<GridWidgetResource>((resolve, reject) => {
if (!this.layout.schema) {
reject();
return;
}

const modal = this.opModalService.show(AddGridWidgetModal, this.injector, { schema: this.layout.schema });
modal.closingEvent.subscribe((modal:AddGridWidgetModal) => {
let registered = modal.chosenWidget;
Expand Down

0 comments on commit dd2d200

Please sign in to comment.