Grid settings freeze page with grid page size options

I created a .NET 6 hosted Blazor WebAssembly app with the following code. Changing the page size a couple of times freezes up when binding a settings field.

<h2>No Settings...no problem changing page size</h2>
<RadzenDataGrid @ref=@dataGrid Data="@orderDetails" TItem="OrderDetail" AllowPaging="true" PageSizeOptions="@pageSizeOptions">
    <Columns>
        <RadzenDataGridColumn TItem="OrderDetail" Property="OrderID" Title="OrderID" />
    </Columns>
</RadzenDataGrid>

<h2>With Settings...changing page size a couple of times freezes page</h2>
<RadzenDataGrid @ref=@dataGrid Data="@orderDetails" TItem="OrderDetail" AllowPaging="true" PageSizeOptions="@pageSizeOptions" @bind-Settings="@Settings">
    <Columns>
        <RadzenDataGridColumn TItem="OrderDetail" Property="OrderID" Title="OrderID" />
    </Columns>
</RadzenDataGrid>

@code {
    RadzenDataGrid<OrderDetail>? dataGrid;
    IEnumerable<int> pageSizeOptions = new int[] { 5, 10, 15 };
    List<OrderDetail>? orderDetails;


    DataGridSettings? Settings { get; set; }

    protected override void OnInitialized()
    {
        orderDetails = new List<OrderDetail>();

        for (int i = 1; i < 25; i++)
        {
            orderDetails.Add(new OrderDetail() { OrderID = i });
        }
    }

    public class OrderDetail
    {
        public int OrderID { get; set; }
        public int ProductID { get; set; }
        public int Quantity { get; set; }
        public decimal Discount { get; set; }
        public decimal UnitPrice { get; set; }
    }

I'm afraid that I cannot reproduce such problem using your code in our demos:


settings-pagesize-options

Hi,

Thanks @Nathan_Alter for reporting this issue and @enchev for being there to help fixing it.

While working with the Datagrid I've faced with this issue too. I've done some tests and used the @Nathan_Alter example in the Demos, but to me it's failing... I don't find any difference between our codes. I post it here exactly how I used it just in case. It would be great to find what is causing this behavior.

2023-06-27-18-27-25 (1)

Code
<h2>With Settings...changing page size a couple of times freezes page</h2>
<RadzenDataGrid @ref=@dataGrid
                 Data="@orderDetails"
                 TItem="OrderDetail"
                 AllowPaging="true"
                 PageSizeOptions="@pageSizeOptions"
                 @bind-Settings="@Settings">
     <Columns>
         <RadzenDataGridColumn TItem="OrderDetail" Property="OrderID" Title="OrderID" />
     </Columns>
 </RadzenDataGrid>
 
 @code {
     RadzenDataGrid<OrderDetail>? dataGrid;
     IEnumerable<int> pageSizeOptions = new int[] { 5, 10, 15 };
     List<OrderDetail>? orderDetails;
 
     DataGridSettings? Settings { get; set; }
 
     protected override void OnInitialized()
     {
         orderDetails = new List<OrderDetail>();
 
         for (int i = 1; i < 25; i++)
         {
             orderDetails.Add(new OrderDetail() { OrderID = i });
         }
     }
 
     public class OrderDetail
     {
         public int OrderID { get; set; }
         public int ProductID { get; set; }
         public int Quantity { get; set; }
         public decimal Discount { get; set; }
         public decimal UnitPrice { get; set; }
     }
 }

Hi @enchev,

I'm wondering what could be happening here, so I've downloaded the project and run it locally.

I see what you are saying, running the demos as Blazor server application looks to work as expected. But when I try running it from Blazor WebAssembly application, then seems like the bug appears. I'm posting the Gif of my experiment and hope this helps to reproduce it now in the local environment.

2023-06-29-11-54-51

Let me know if I'm doing anything wrong please.

Thanks!

I was able to reproduce this unfortunately I'm not sure why it happens - it will not break anywhere in our code.

Having the same issue here. Any updates?

I’m afraid I don’t have any other information.

Thanks! Is there any issue open related to this bug?
Is there an ETA?

Hey @kstavrou,

I’m afraid that we cannot provide anything else as details - as I already said there is no loop in our code. If you feel you know what’s going on and you have a fix for this you can submit pull request.