Skip to content

problem opening the modal the 2nd time #6915

@franciscojml

Description

@franciscojml

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

  1. Click the Advanced Search button
  2. Select values ​​for the form fields
  3. Click the Search button
  4. Click the Advanced Search button
  5. Verify that the previously entered values ​​are selected

Exceptions (if any)

No response

.NET Version

NET9.0

Anything else?

No response

Sub-issues

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions