Bug Report T1287297
Visible to All Users

ComboBox for Blazor - Text is not cleared if the Text property is cleared immediately after loading a data source

created 13 days ago (modified 13 days ago)

Steps to reproduce:

  1. Run the attached project.
  2. Select Alice in the combobox.
  3. Click the Clear button.

Expected results:

The combobox is cleared.

Current results:

The combobox is not cleared.

Two possible workarounds:

1. Add a timeout:

C#
private async Task ClearClick() { await GetOperatorAsync(); OperatorData = await GetOperatorAsync(); await Task.Delay(1); Operator = string.Empty; }

2. Reset the @key property:

Bind the DxComboBox @key property to a GUID variable:

Razor
<DxComboBox @ref="OperatorComboBox" @key="@CbKey" .../> @code { Guid CbKey { get; set; } = Guid.NewGuid(); }

Reset this variable:

C#
private async Task ClearClick() { await GetOperatorAsync(); OperatorData = await GetOperatorAsync(); Operator = string.Empty; CbKey = Guid.NewGuid(); }

Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.