Multiple Modal Dialogs

Hi,

I have created a simple page with a textbox and a label that I use as "Input Dialog" to query a string from the user. This works well by using the "Show Dialog" action e.g. in the click handler of a button to bring up the dialog and to let the user input some text. I have two parameters "Prompt" for setting the text of the label and "Input" to prefill the textbox if desired with some text.

Now, I have ran into a problem which I suspect to be a bug:

I use "Open Dialog" to show the dialog and set a "Title" and my parameters "Prompt" and "Input". In the "then" statement of the "Open Dialog" action, I set a variable to ${Result} and then, on the same level, I do another "Open Dialog" on the same dialg with a different "Title", "Prompt" and "Input". The strange thing is that the old dialog is still there, only the "Title" changes.

So it looks like the dialog remains there and only the title gets updated.

I also tried a "Close Dialog" before calling the 2nd "Open Dialog" but this does not work (still the same behaviour as described before).

How can I open another instance of the same dialog in the "then" statement, after the 1st dialog is done and has been closed?

Thanks for your help!

Hi @JustJoe,

Please send us this application/page to check the exact code and test it locally.

Ok, thanks. I have sent you an email with the details.

Hi @JustJoe,

We received your input dialog code however we will need the code of the page where this dialog is used in exact way that demonstrates the issue you report.

1 Like

Hi @enchev ,

thanks a lot for your help. Your workaround did work! In case anybody else should run into the same problem, I post the solution here:

Add the following method into the code behind class file of the dialog page:

    public partial class InputDialogComponent
    {
        protected override async Task OnParametersSetAsync()
        {
            await base.OnParametersSetAsync();

            await Load();
        }
    }

Thanks a lot and best regards!