Binding SelectedNodes can throw an exception when items are delivered after some delay

Hi,


I have a TreeView where I want to use @bind-SelectedNodes.

The DataSource (List of TValue) of the TreeView is initialized after some delay (due to an API call).

In this case the component throws an out of range exception.

If I remove the delay or the binding to selectedNodes it will work, but I need it to work with both.


It was working until 27.1.48. Starting from 27.1.50 there is an exception.

Please see the repro : https://blazorplayground.syncfusion.com/rjhzsZjmSGKiDOFc


Regards.

Julien


2 Replies 1 reply marked as answer

SA SureshRajan Alagarsamy Syncfusion Team October 8, 2024 03:55 PM UTC

Hi Julien,

We have reviewed your query and understand that you are experiencing an exception issue in initial rendering of the TreeView component after upgrading from version 27.1.48 to 27.1.50. Upon further validation, we have considered this as bug. The fix for this issue will be included in the weekly patch release scheduled for October 15, 2024.

You can track the status of the fix through the following link.


Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.

Regards,
Suresh.

Marked as answer

SA SureshRajan Alagarsamy Syncfusion Team October 18, 2024 01:00 PM UTC

Hi Julien,

Thanks for your patience.

The issue with "Null reference exception in TreeView during initial rendering with delayed initialization and SelectedNodes assignment" has been resolved in this release. To access this fix, we suggest you update the package to 27.1.53 and we include the sample in the latest version for your reference.

Sample: Attached as zip folder.


We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.

Regards,
Suresh.

Attachment: TreeView_4b5917a3.zip

Loader.
Up arrow icon