Declined
Last Updated: 27 May 2024 19:37 by George
Edward
Created on: 30 Apr 2024 16:15
Category: UI for Blazor
Type: Bug Report
0
FormItem - DropDownLists populated inside of a template vdo not render data correctly

See below repl

https://blazorrepl.telerik.com/GeYodYvp135zJH7N22

The first dropdown is populated correctly, it is not in a FormItem or Template

The second one, populated in the same way but inside a FormItem context does not show the data, it only redraws and shows data when entering another control i.e. the other working dropdown.

This was previously working when the application was using .net 6 and Telerik 3.6.1
It has since been updated to .net 8 and Telerik 5.1.1

What is the correct way to populate this?
Can you provide more information?

Thanks.

7 comments
George
Posted on: 27 May 2024 19:37

Hi Svetoslav

Thanks, that should work for us.

Cheers George

ADMIN
Svetoslav Dimitrov
Posted on: 27 May 2024 11:28

Hello George,

In this case, my best suggestion is to move the FormItem and Template tags in the TelerikForm, instead of the custom component, and let the TelerikForm handle the lifecycle events. Here is a modified version of the snippet.

Regards,
Svetoslav Dimitrov
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources!
George
Posted on: 21 May 2024 08:20

Hi

The problem we are facing is that when we try to load the data asynchronously it doesn't work correctly.

Please see this modified version of your REPL: https://blazorrepl.telerik.com/weufcFEi15hJH4ur19

Please note that the Destination Country list is not populated.

However, if line 23 of CustomDropDown.razor is commented out then it works.

Hopefully this demonstrates the issue with async/await more clearly.

 

ADMIN
Svetoslav Dimitrov
Posted on: 21 May 2024 08:02

Hello George and Edward,

Here is a REPL snippet where I have added the behavior you are after. I would recommend going through the following resources:

Regards,
Svetoslav Dimitrov
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources!
George
Posted on: 14 May 2024 11:31

Hi Svetoslav

In Edward's example REPL, the purpose of ProductItem.razor is to encapsulate the behaviour of retrieving the product data for the dropdown. In your REPL the loading of the products has moved up to __Main.razor.

Please could you modify your REPL to demonstrate the syntax for loading the products within ProductItem.razor. As all the ways we have tried result in the dropdown list not showing the items.

Thanks

George


ADMIN
Svetoslav Dimitrov
Posted on: 13 May 2024 12:13

Hello Edward,

I have revised the code snippet that you sent to us. Here is a revised version of it. In short, the issue is connected to the way you bound the custom component with parameters. 

That being said, I mark this bug report as Declined.

Regards,
Svetoslav Dimitrov
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources!
Edward
Posted on: 30 Apr 2024 16:21

Hi, further to this. If you change the version in the repl you can see it start working as expected.

Switching between the versions, it was working up until 4.0.1, it then stopped working in 4.1.0

Thanks.

 

Attached Files: