-
-
Notifications
You must be signed in to change notification settings - Fork 362
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
The values entered for some fields in the Advanced Search form are being erased when the modal is opened for the second time.
After running several tests to determine the cause, I discovered the following behavior:
Test 1: UNCOMMENTED -> await loadReportAttachments();
In the OnInitializedAsync() method on line 104 -> "await loadReportAttachments();" of the Demo.razor class
When I run the solution, I open the Advanced Search modal for the first time, select the values for all the form fields, then press the "Search" button and reopen Advanced Search.
The selected values for the "Cascader root," "Multiselect," and "SubType Person" fields are erased.
Test 2: COMMENTED -> await loadReportAttachments();
In the OnInitializedAsync() method on line 104 -> "await cargaAnexosRelatorios();" of the Demo.razor class, I leave this line commented out.
When I run the solution, I open the Advanced Search modal for the first time, select the values for all the form fields, then press the "Search" button and open Advanced Search again.
The selected values for the "Cascader root," "Multiselect," and "SubType Person" fields remain, thus demonstrating the correct behavior.
I emphasize that the "await cargaAnexosRelatorios();" method makes calls to external APIs.
Error.mp4
Expected Behavior
I fill in the advanced search fields and click search, I open the advanced search screen again and the fields that had been selected remain with the selected values.
Interactive render mode
Interactive Server (Interactive server-side rendering (interactive SSR) using Blazor Server)
Steps To Reproduce
https://github.com/franciscojml/ArgoZhang_BootstrapBlazorApp
- Click the Advanced Search button
- Select values for the form fields
- Click the Search button
- Click the Advanced Search button
- Verify that the previously entered values are selected
Exceptions (if any)
No response
.NET Version
NET9.0
Anything else?
No response