-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Dialog.Hide() doesn't hide in DialogService/FluentDialog #2542
Comments
The changes we made after 4.8.1 are needed to be able to update the contents of an already shown dialog (see #2310). That change has apparently lead to your code being broken. |
So this means that it is not possible to use the FluentUI components to create designs like Microsoft does all over the place with nested panels, such as all their administration apps? I understand that two panels/dialogs cannot be shown simultaneously, that's why we've used Dialog.Hide() to only show one panel at a time. This change totally destroys our/MS design paradigm and throws away hundreds of hours of work. Not happy! |
The strange thing is it does work like you describe if you close the second dialog and then open that one again. I'll reopen this and see if we can find a solution to make it work again. Will need some time though (until @dvoituron is back from vacation) |
Phew, thanks Vincent, that will save a lot of work for us. |
Ok, I found what is causing the issue. I just need to check if the solution can be implemented without having side-effects |
* Fix microsoft#2542 by not including Instance.ontent in hash code method. * Fix issue by adding Visible to DialogParameters. Dialog Hide/Show methods will now set Visible value. Provider will only render dialog if Visible is true.
🐛 Bug Report
In our app, which resembles many of MS admin apps such as M365 admin, we use panels to display and gather primary data about an entity. For child entities we hide the primary panel and show a secondary panel to gather data for these, which has worked fine up to and including v4.8.1.
However, after upgrading to versions greater than 4.8.1 we experience that the primary panel isn't hidden, if data has been entered into it before the secondary panel is shown. If no data has been entered in the primary panel it is hidden correctly.
💻 Repro or Code Sample
I've attached an example solution using dialogs where the error can be reproduced.
If the project dependencies of the FluentUI components is set back to 4.8.1 the problem goes away.
FluentBlazorLayeredDialogs.zip
🤔 Expected Behavior
The dialog/panel should be hidden after a call to Dialog.Hide()
😯 Current Behavior
After v.4.8.1 the dialog/panel isn't hidden, if data has been entered into a field in the dialog.
🌍 Your Environment
The text was updated successfully, but these errors were encountered: