Hi, I'm trialling the latest version at the moment (v2.15.0) with a WebAssembly project and I've encountered an odd issue.
Essentially, when I have a component with a Guid parameter, and a TelerikAutoComplete component inside an EditForm there's some kind of render loop happening on the page. The browser tools show the DOM being updated constantly and the OnParametersSet override is being called constantly. Tested in MS Edge 83.
Moving the AutoComplete outside the EditForm or changing the parameter to something else such as an Int32 causes the issue to no longer present itself.
Not sure if this is being caused by the Telerik component or a bug in Blazor itself, but I imagine it's a fairly common scenario.
Simple reproduction code below.
@page
"/customers/test/{Parameter1:guid}"
@
if
(Model !=
null
)
{
<EditForm Model=
"Model"
>
<TelerikAutoComplete Data=
"@Fruit"
Filterable=
"true"
@bind-Value=
"@Model.SelectedFruit"
ValueField=
"@(nameof(SimpleObject.DisplayName))"
/>
</EditForm>
}
@code {
[Parameter]
public
Guid Parameter1 {
get
;
set
; }
public
SimpleTestModel Model {
get
;
set
; }
public
IEnumerable<SimpleObject> Fruit {
get
;
set
; }
protected
override
async Task OnInitializedAsync()
{
await Task.Delay(100);
this
.Fruit =
new
SimpleObject[]
{
new
SimpleObject(1,
"Lemon"
),
new
SimpleObject(2,
"Orange"
),
new
SimpleObject(3,
"Kiwi"
)
};
}
protected
override
async Task OnParametersSetAsync()
{
Console.WriteLine(
"ParametersSet"
);
await Task.Delay(100);
this
.Model =
new
SimpleTestModel();
}
public
class
SimpleTestModel
{
public
string
SelectedFruit {
get
;
set
; }
}
public
class
SimpleObject
{
public
SimpleObject(
int
id,
string
name)
{
this
.Id = id;
this
.DisplayName = name;
}
public
int
Id {
get
;
set
; }
public
string
DisplayName {
get
;
set
; }
}
}