Skip to content

[MVUX][ListState/ListFeed] Add Method/Argument/Identifing Parameter for CRUD Elements per index inside of ListState/ListFeed #2922

@DevTKSS

Description

@DevTKSS

What would you like to be added:

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.

For which Platform:

  • All Platforms

Anything else we need to know?

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/enhancementNew feature or request.triage/untriagedIndicates an issue requires triaging or verification.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions