Unplanned
Last Updated: 29 Nov 2023 14:06 by ADMIN
Roberto
Created on: 21 Nov 2023 09:42
Category: UI for Blazor
Type: Feature Request
3
Add a GetSelectedItem function to the ComboBox component

When using the OnRead event of the ComboBox there is no way to retrieve the selectedItem because the list of items that is populated is internal.

There are 2 workaround but they are not ideal:

- Saving the list of items returned by the OnRead event into a parallel list and then retrieve the selectedItem from it -> the problem is that there will be 2 identical lists in memory and, if scaled, might cause problems:

CachedSitesList = result.Items;

args.Data = result.Items;
args.Total = (int)result.TotalCount;

- Retrieving the selectedItem by calling the DB using the Id of the item -> the problem is that it's one more request to add to the DB and the performance is going to decrease if scaled, also it seems useless as the item is already present in memory.

We suggest adding a function to return the selectedItem to improve performance and scalability of the component.

0 comments