RadzenDropDown unexpected item change on reload page #1793

Closed
opened 2026-01-29 17:58:39 +00:00 by claunia · 0 comments
Owner

Originally created by @lg2de on GitHub (Jun 21, 2025).

Today (with version 7.1.1) I faced an issue which seems to be present already several time (also verified in 5.9.7).
A RadzenDropDown gets unexpected call of SelectedItemChanged or Change event when page gets reloaded manually by pressing function key F5. But, this problem only apears when the drop down was opened.

Sample code in your razor page:

List<string> stringList = ["Option1", "Option2", "Option3"];
string selectedItem = stringList[1];
<RadzenDropDown
    Data="@stringList"
    @bind-Value="@selectedItem"
    SelectedItemChanged="o => Console.WriteLine(o)"/>

To Reproduce

  1. Load the page - Option2 is selected, no Console output visible -> ok
  2. Reload the page - Option2 is selected, no Console output visible -> ok
  3. Select Option3 - Option3 is selected, Option3 is written to Console output -> ok
  4. Reload the page - Option1 is visible as selected very shortly before page gets reloaded, Option1 is written to Console output -> not ok (Option2 gets selected as expected)
  5. Reload the page - Option2 is selected, no Console output visible -> ok
  6. Just open the DropDown and reload the page - Option1 is visible as selected very shortly before page gets reloaded, Option1 is written to Console output -> not ok (Option2 gets selected as expected)
  7. Reload the page - Option2 is selected, no Console output visible -> ok

Expected behavior
Option1 must not get selected item if not selected explicitly by the user.

Screenshots
N/A

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Tested with Vivalidi (7.4.3684.55) and Chrome (137.0.7151.104)
Originally created by @lg2de on GitHub (Jun 21, 2025). Today (with version 7.1.1) I faced an issue which seems to be present already several time (also verified in 5.9.7). A `RadzenDropDown` gets unexpected call of `SelectedItemChanged` or `Change` event when page gets reloaded manually **by pressing function key `F5`**. But, this problem only apears when the drop down was opened. Sample code in your razor page: ```razor List<string> stringList = ["Option1", "Option2", "Option3"]; string selectedItem = stringList[1]; <RadzenDropDown Data="@stringList" @bind-Value="@selectedItem" SelectedItemChanged="o => Console.WriteLine(o)"/> ``` **To Reproduce** 1. Load the page - `Option2` is selected, no Console output visible -> ok 2. Reload the page - `Option2` is selected, no Console output visible -> ok 3. Select `Option3` - `Option3` is selected, `Option3` is written to Console output -> ok 4. Reload the page - **`Option1` is visible as selected very shortly before page gets reloaded, `Option1` is written to Console output -> not ok** (`Option2` gets selected as expected) 5. Reload the page - `Option2` is selected, no Console output visible -> ok 6. Just open the DropDown and reload the page - **`Option1` is visible as selected very shortly before page gets reloaded, `Option1` is written to Console output -> not ok** (`Option2` gets selected as expected) 7. Reload the page - `Option2` is selected, no Console output visible -> ok **Expected behavior** `Option1` must not get selected item if not selected explicitly by the user. **Screenshots** N/A **Desktop (please complete the following information):** - OS: Windows 11 - Browser: Tested with Vivalidi (7.4.3684.55) and Chrome (137.0.7151.104)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1793