Once the item becomes visible, the application's UI code provides the item's state again.
E.g. pseudocode:
for (firstVisibleItemIndex .. lastVisibleItemIndex) |itemIndex| {
ui_list_item(itemIndex, listItemValues[itemIndex]);
}
For instance Dear ImGui has the concept of a 'list clipper' which tells the application the currently visible range of a list or table-column and the application only provides the state of the currently visible items to the UI system.
Same way as for regular ui items, if the application's ui code no longer "mentions" those items, their state can be deleted (assuming the immediate mode tracks hidden items for some reason).
E.g. pseudocode:
For instance Dear ImGui has the concept of a 'list clipper' which tells the application the currently visible range of a list or table-column and the application only provides the state of the currently visible items to the UI system.