How to use the @angular/material.MatDialogConfig function in @angular/material

To help you get started, we’ve selected a few @angular/material examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dcaslin / d2-checklist / src / app / gear / gear / gear.component.ts View on Github external
showPossibleRolls(i: InventoryItem) {
    const dc = new MatDialogConfig();
    dc.disableClose = false;
    // dc.autoFocus = true;
    // dc.width = '1000px';
    dc.data = {
      parent: this,
      item: i
    };
    this.dialog.open(PossibleRollsDialogComponent, dc);

  }
github dcaslin / d2-checklist / src / app / clan / clan-triumphs / clan-triumph-item / clan-triumph-item.component.ts View on Github external
public openTriumphDialog(triumph: ClanSearchableTriumph): void {
    const dc = new MatDialogConfig();
    dc.disableClose = false;
    dc.autoFocus = true;
    dc.data = triumph;
    this.dialog.open(ClanTriumphItemDialogComponent, dc);
  }
github dcaslin / d2-checklist / src / app / player / progress / progress.component.ts View on Github external
public openStepDialog(faction: Progression): void {
    const dc = new MatDialogConfig();
    dc.disableClose = false;
    dc.autoFocus = true;
    dc.data = faction;
    dc.maxWidth = '500px';
    this.dialog.open(ProgressStepDialogComponent, dc);
  }
github djjorik / angular-chat / src / app / components / users-control / users-control.component.ts View on Github external
openAddUserModal(user?: User): void {
    const config = new MatDialogConfig();
    if (user) {
      config.data = user;
    }
    let dialogRef = this.dialog.open(AddUserComponent, config);

    dialogRef.afterClosed().subscribe((result: CommonResult) => {
      if (result && result.success) {
        this.disabledAnimation = false;
        this.getUsers();
        setTimeout(() => this.disabledAnimation = true, 0);
      }
    });
  }
github Azure / BatchExplorer / app / components / base / list-and-show-layout / list-and-show-layout.component.ts View on Github external
public deleteSelectedItems() {
        let config = new MatDialogConfig();

        const dialogRef = this.dialog.open(DeleteSelectedItemsDialogComponent, config);
        dialogRef.componentInstance.items = this.list.selectedItems;
        dialogRef.afterClosed().subscribe((proceed) => {
            if (proceed) {
                this.list.deleteSelected();
                this.list.clearSelection();
            }
        });
    }
github alexjlockwood / ShapeShifter / src / app / modules / editor / components / dialogs / dialog.service.ts View on Github external
dropFiles(): Observable {
    return this.dialog.open(DropFilesDialogComponent, new MatDialogConfig()).afterClosed();
  }
}
github dcaslin / d2-checklist / src / app / clan / clan-collections / clan-badges / clan-badges.component.ts View on Github external
public openBadgeDialog(badge: ClanBadge): void {
    const dc = new MatDialogConfig();
    dc.disableClose = false;
    dc.autoFocus = true;
    dc.data = badge;
    this.dialog.open(ClanCollectionBadgeDialogComponent, dc);
  }
github nhsconnect / careconnect-reference-implementation / ccri-management-app / src / main / web / src / app / component / location / location.component.ts View on Github external
select(resource) {
    const dialogConfig = new MatDialogConfig();

    dialogConfig.disableClose = true;
    dialogConfig.autoFocus = true;
    dialogConfig.data = {
      id: 1,
      resource: resource
    };
    const resourceDialog: MatDialogRef = this.dialog.open( ResourceDialogComponent, dialogConfig);
  }
github nhsconnect / careconnect-reference-implementation / ccri-management-app / src / main / web / src / app / component / flag / flag.component.ts View on Github external
select(resource) {
    const dialogConfig = new MatDialogConfig();

    dialogConfig.disableClose = true;
    dialogConfig.autoFocus = true;
    dialogConfig.data = {
      id: 1,
      resource: resource
    };
    const resourceDialog: MatDialogRef = this.dialog.open( ResourceDialogComponent, dialogConfig);
  }
github relair / material-dynamic-table / projects / material-dynamic-table / src / lib / dynamic-table.component.ts View on Github external
filter(column: ColumnConfig) {
    const filter = this.columnFilterService.getFilter(column.type);

    if (filter) {
      const dialogConfig = new MatDialogConfig();
      const columnFilter = new ColumnFilter();
      columnFilter.column = column;

      if (this.appliedFilters[column.name]) {
        columnFilter.filter = Object.create(this.appliedFilters[column.name]);
      }

      dialogConfig.data = columnFilter;

      const dialogRef = this.dialog.open(filter, dialogConfig);

      dialogRef.afterClosed().subscribe(result => {
        if (result) {
          this.appliedFilters[column.name] = result;
        } else if (result === '') {
          delete this.appliedFilters[column.name];