thingsboard icon indicating copy to clipboard operation
thingsboard copied to clipboard

[3.4.1] UI: Add id to closing button of dashboard state dialog.

Open devaskim opened this issue 3 years ago • 0 comments

I wish to close dashboard state opened in dialog from my custom widget. I could not find a way to pass MatDialogRef to each widget context and no one (unfortunately, as usual) helped me (see #6867) in finding the right way.

So I added id to closing button which (id) is a current dashboard state. So now I can trigger button click from my custom widget and close the dashboard state dialog. Like this:

$(`button[id$='${self.ctx.stateController.getStateId()}']`).click();

devaskim avatar Jul 25 '22 20:07 devaskim

Hi @devaskim, you need to save the link to the dialog because this method is unreliable.

vvlladd28 avatar Aug 16 '22 11:08 vvlladd28