The popup window is not closed when the ComboBox is disabled from code.
Reproduction code:
Selected value: @selectedValue
<br />
<TelerikComboBox Data="@myComboData"
TextField="MyTextField"
ValueField="MyValueField"
Value="selectedValue"
ValueChanged="@((int value) => ValueChangedHandler(value))"
Placeholder="Select an item..."
ClearButton="true"
Enabled="@isEnabled"
Filterable="true">
</TelerikComboBox>
@code {
public bool isEnabled { get; set; } = true;
IEnumerable<MyDdlModel> myComboData = Enumerable.Range(1, 20).Select(x => new MyDdlModel { MyTextField = "item " + x, MyValueField = x });
int selectedValue { get; set; } = 3; //usually the current value should come from the model data
public async Task ValueChangedHandler(int value)
{
isEnabled = false;
await Task.Delay(4000); //simulate network delay
selectedValue = value;
isEnabled = true;
}
//in a real case, the model is usually in a separate file
//the model type and value field type must be provided to the dropdpownlist
public class MyDdlModel
{
public int MyValueField { get; set; }
public string MyTextField { get; set; }
}
}