-
ABP Framework version: v9.0.5
-
UI Type: Blazor Server
-
Database System: EF Core (SQL Server)
-
Tiered (for MVC) or Auth Server Separated (for Angular): no
-
Exception message and full stack trace:
-
Steps to reproduce the issue:
Create a new ABP Blazor Server application.
Create a simple entity to use for the extension property.
Configure the extra property for IdentityUser in ExtensionConfigurator.
Override the UserManagement razor component with the source code from the module.
Run the application and navigate to the Identity Users management page.
Open the Create or Edit User modal.
Select an option from the dropdown field.
Click outside of the field to lose focus.
Click back into the field and select another option.
The selected value does not clear and is duplicated/added to each time.
Is there a known issue with dropdown extension properties in Blazor Server, and how can we ensure the selection clears correctly? Could this be related to overriding the UserManagement component? Looking at the code for LookupExtensionProperty.razor.cs we think it could be related to how items are added when parameters are set.
protected override void OnParametersSet()
{
var value = Entity.GetProperty(PropertyInfo.Name);
var text = Entity.GetProperty(TextPropertyName);
if (value != null && text != null)
{
lookupItems.Add(new SelectItem
{
Text = Entity.GetProperty(TextPropertyName)!.ToString()!,
Value = value
});
}
}

Thanks