Grid RowSelect event stuck in a loop

I'm using a RadzenGrid as follows:

<RadzenGrid @ref="masterGrid" AllowFiltering="true" AllowSorting="true" AllowPaging="true"
Data="@envContext.RefCode.OrderBy(c => c.Fld)" TItem="Models.RefCode" Value="@codeMaster"
RowSelect="@MasterRowSelect">

It correctly calls the MasterRowSelect with the selected row the first time, but the continues to call the MasterRowSelect function with an empty row passed in an endless loop.
Here is the code for the MasterRowSelect:

private void MasterRowSelect(Models.RefCode args)
{
if (args == null || args.Fld == null) return;
}

Any ideas?

Hi @Tom_Gillespie,

I am afraid we couldn't reproduce this behavior. Can you somehow reproduce it in any of our online demos? Or paste here some code that reproduces it?

Thanks for the reply Korchev.
I compared my code to your LatestBlazor.DataGridPage .
I noticed that your page was loading the data on initialize and the data grid referred to the result variable.
I had the Data property set to a LINQ query directly. e.g.
Data="@envContext.RefCode.OrderBy(c => c.Fld)
I changed my code to load the data in the OnInitialize and have the grid Data set to the result variable.
Works great this way.
Thanks for the help.
Tom