Autocomplete Has Null Exception When Clearing Field If Bound With bind-Value
In the below code I get a null reference exception when emptying the autocomplete, either by clearing it or clicking the X.
If I remove the bind-Value parameter, I do not get the exception.
Am I doing something wrong?
<div class="col-md-3">
<EjsAutoComplete @bind-Value="_boundValue" TValue="string" Placeholder="Add a country" FloatLabelType="@FloatLabelType.Always" Query="@QueryCountries" MinLength="2">
<EjsDataManager AdaptorInstance="@typeof(DataAdaptorForCountriesBasic)" Adaptor="Adaptors.CustomAdaptor"></EjsDataManager>
<AutoCompleteFieldSettings Value="CountryGuid" Text="CountryName"></AutoCompleteFieldSettings>
</EjsAutoComplete>
</div>
...
@code{
private string _boundValue;
Exception from Chrome console:
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Object.GetType()
at Syncfusion.EJ2.Blazor.BaseComponent.updateProperty[T](String key, T publicValue, T privateValue, Object eventCallback, Expression`1 expression, Boolean isDataSource, Boolean isObservable)
at Syncfusion.EJ2.Blazor.DropDowns.EjsAutoComplete`1.OnParametersSetAsync()
at Syncfusion.EJ2.Blazor.BaseComponent.UpdateModel(Dictionary`2 properties)
Error: System.NullReferenceException: Object reference not set to an instance of an object.
at System.Object.GetType()
at Syncfusion.EJ2.Blazor.BaseComponent.updateProperty[T](String key, T publicValue, T privateValue, Object eventCallback, Expression`1 expression, Boolean isDataSource, Boolean isObservable)
at Syncfusion.EJ2.Blazor.DropDowns.EjsAutoComplete`1.OnParametersSetAsync()
at Syncfusion.EJ2.Blazor.BaseComponent.UpdateModel(Dictionary`2 properties)
at Object.endInvokeDotNetFromJS (https://localhost:5001/_framework/blazor.server.js:8:31660)
at e.<anonymous> (https://localhost:5001/_framework/blazor.server.js:8:103446)
at https://localhost:5001/_framework/blazor.server.js:1:19202
at Array.forEach (<anonymous>)
at e.invokeClientMethod (https://localhost:5001/_framework/blazor.server.js:1:19173)
at e.processIncomingData (https://localhost:5001/_framework/blazor.server.js:1:17165)
at e.connection.onreceive (https://localhost:5001/_framework/blazor.server.js:1:10276)
at WebSocket.i.onmessage (https://localhost:5001/_framework/blazor.server.js:1:38091)
throwError @ ejs.interop.min.js:1
updateModel @ ejs.interop.min.js:1
async function (async)
updateModel @ ejs.interop.min.js:1
e.serverDataBind @ constants.js:93
e.saveChanges @ constants.js:93
(anonymous) @ constants.js:93
t.resetSelection @ constants.js:93
t.clearAll @ constants.js:93
t.clearAll @ constants.js:93
t.clearAll @ constants.js:93
t.hidePopup @ constants.js:93
t.hidePopup @ constants.js:93
t.hidePopup @ constants.js:93
t.focusOut @ constants.js:93
t.focusOutAction @ constants.js:93
t.onBlur @ constants.js:93
t.onBlur @ constants.js:93
SIGN IN To post a reply.
1 Reply
BC
Berly Christopher
Syncfusion Team
February 24, 2020 09:28 AM UTC
Hi Robert,
Greetings from Syncfusion support.
We were able to replicate the reported issue. We have already logged this as a bug at our end. We will fix and include the solution on our next week patch release, which is expected to be rolled out on February 25th, 2020. Please be patient until then.
You can track the status of this problem by using the below feedback portal.
Regards,
Berly B.C
SIGN IN To post a reply.
- 1 Reply
- 2 Participants
-
RO Robert
- Feb 21, 2020 05:41 PM UTC
- Feb 24, 2020 09:28 AM UTC