You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[MVUX][ListState/ListFeed] Add Method/Argument/Identifing Parameter for CRUD Elements per index inside of ListState/ListFeed #2922
I would like to have a object or numeric identifyier per ListState/ListFeed Item, to know on which position this Item is, without having to insert such Property into an eventual Record type definition (not working for simple types!) and having to update ALL Items all the time, just to have this workaround identifier up to date
Why is this needed:
(for simplification, I will use ListState for both MVUX Collection kinds, but meaning them both!)
A ListState for example does encapsulate its Value Type in a IImmutableList<T> and in case we might have multiple equal items on different positions inside of this List, we do not have the possibility to check this without one of this workarounds:
(currently used) iterating over the ListState using e.g. await MyListState.Value(ct:token); -> which will return the whole IImmutableList<T> where you then have at least a numeric List default Identifyer
Creating a Record Definition to encapulate this and change ALL of the items in the ListState each time. Definition could be like MyRecord(int Id, string SimpleTypeData). This approach would, as you might notice, just destroy the whole Immutability we are getting from Mvux 👀
Maybe but really complicated since we are by that loosing the whole ListState methods(!) using State<IImmutableDictionary<T>> which would then enable us maybe to have a non-numeric identifyer if our data maybe require this
Sample Szenario
For example, if you have a ListState like described:
[
Item1,
Item2,
Item3,
Item4,
Item5
]
and lets say 2 and 4 would be equal.
now your User might have selected the Item4 and you want to remove ALL items after this (transferable to selection of Item2 etc) you have no way to know the position of this one you got selected.
Just to add one more clarification from a business-app perspective:
The issue isn’t the selection coming from the UI — that part works reliably.
The real limitation appears when a Button.Command in the data layer needs to operate on “the same item” inside a ListState that may contain duplicates. With the current API, any equality-based operation ends up acting on all equal items, with no positional or instance-level targeting.
This makes scenarios like “remove all items after this occurrence” or “update exactly this instance” difficult to implement in real-world workflows.
Also, it looks like the KeyEquality documentation was dropped from the TOC — which makes it harder for users to discover the only currently available mechanism for distinguishing records. Would it be possible to re-add it? Send you over a PR for this, so should be a quick fix
Activity
DevTKSS commentedon Nov 20, 2025
Just to add one more clarification from a business-app perspective:
The issue isn’t the selection coming from the UI — that part works reliably.
The real limitation appears when a
Button.Commandin the data layer needs to operate on “the same item” inside aListStatethat may contain duplicates. With the current API, any equality-based operation ends up acting on all equal items, with no positional or instance-level targeting.This makes scenarios like “remove all items after this occurrence” or “update exactly this instance” difficult to implement in real-world workflows.
Also, it looks like the
KeyEqualitydocumentation was dropped from the TOC — which makes it harder for users to discover the only currently available mechanism for distinguishing records. Would it be possible to re-add it? Send you over a PR for this, so should be a quick fix@Jen-Uno
Is this scenario already on the radar together with
Both points would significantly help business-oriented MVUX usage.