'How to pass a function in material ui bottom sheet

I have 2 material ui bottom sheets. I want to pass a function in the first bottom sheet. And I want to invoke that function when the second bottom sheet is opened from the first bottom sheet.

this._bottomSheet
        .open(ActionComponentAuditor, {
          data: {
            name: this.name,
            email: this.email,
            plant: this.plant,
            country: this.country,
          },
        })
        .afterDismissed()
        .subscribe((result) => {
          this.func;
        });

I want this.func to run whenever the 2nd bottom sheet is closed



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source