You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you try to use dialogues within the OnCompleted task of a FluentInputFile component, the buttons within the dialogue do not respond.
💻 Repro or Code Sample
This assumes that <FluentDialogProvider /> is added within MainLayout.razor or App.razor.
@page "/sandbox"<h3>@_message</h3><FluentStack HorizontalGap="4"><FluentButton OnClick="ShowConfirmationAsync"Appearance="Appearance.Accent">Show Confirmation Directly
</FluentButton><FluentButton Id="btnUpload" Appearance="Appearance.Accent">Upload Then Confirm
</FluentButton></FluentStack><FluentInputFile Class="h-fit w-full"Multiple="false"AnchorId="btnUpload"Mode="InputFileMode.Stream"MaximumFileSize="@(1024 * 1024 * 1024)"DragDropZoneVisible="false"OnCompleted="OnFileUploadedAsync"/>@code{private string _message = "Ready.";
[Inject]private IDialogService Dialogue {get;init;}
private asyncTaskOnFileUploadedAsync(IEnumerable<FluentInputFileEventArgs>args){awaitShowConfirmationAsync();}
private asyncTaskShowConfirmationAsync(){var dialogue =awaitDialogue.ShowConfirmationAsync("Do you want to continue?");var result =awaitdialogue.Result;
_message =result.Cancelled?"Cancelled":"Accepted";}}
🤔 Expected Behavior
Whether the confirmation dialogue is shown via OnClick from FluentButton, or OnComplete from FluentInputFile, both should allow the dialogue to be responsive.
😯 Current Behavior
The above code sample shows that the buttons within the dialogue are unresponsive, if called via the OnCompleted task.
💁 Possible Solution
Could the OnCompleted task be detached from the page dispatcher, requiring an InvokeAsync wrapper to reattach it?
🔦 Context
One of our services is Partially Automated Workflows, where the user uploads a file, and needs to confirm that they wish to continue if there are any chargable items within the workflow. This issue stops that process from working.
🌍 Your Environment
OS & Device: Windows 11 Enterprise
Browser: Tested on Firefox, Edge, Opera, Chrome, and Maxathon
Framework Version: net8.0
Blazor App: Global InteractiveServer
Fluent UI Blazor library Version: 4.11.4
The text was updated successfully, but these errors were encountered:
🐛 Bug Report
If you try to use dialogues within the
OnCompleted
task of aFluentInputFile
component, the buttons within the dialogue do not respond.💻 Repro or Code Sample
This assumes that
<FluentDialogProvider />
is added withinMainLayout.razor
orApp.razor
.🤔 Expected Behavior
Whether the confirmation dialogue is shown via
OnClick
fromFluentButton
, orOnComplete
fromFluentInputFile
, both should allow the dialogue to be responsive.😯 Current Behavior
The above code sample shows that the buttons within the dialogue are unresponsive, if called via the
OnCompleted
task.💁 Possible Solution
Could the
OnCompleted
task be detached from the page dispatcher, requiring anInvokeAsync
wrapper to reattach it?🔦 Context
One of our services is Partially Automated Workflows, where the user uploads a file, and needs to confirm that they wish to continue if there are any chargable items within the workflow. This issue stops that process from working.
🌍 Your Environment
The text was updated successfully, but these errors were encountered: