Skip to content

[Docs][Mvux][ListState] UpdateItemAsync is not possible like showed in the docs if the item is a simple string #2881

Open

Description

@DevTKSS

On which page?

> [!TIP]
> You don't have to implement `IKeyEquatable<T>` by yourself, see [generation](xref:Uno.Extensions.Equality.concept#generation) for more information.

Instead of using the `updater`, you can also pass in a new item to replace the old one:
```csharp
public async ValueTask MakeUpperCase(CancellationToken ct = default)
{
var itemToUpdate = new MyItem(2, "Two");
await MyItems.UpdateItemAsync(
oldItem: itemToUpdate,
newItem: new MyItem(2, "TWO"),
ct: ct);
}
```

What's wrong?

Using a "simple" string type in the ListView -> IListState with the target to replace the selected Item known in the IState<string> SelectedMember via the DashboardList.UpdateItemAsync( Method which is used in the documentation for a complex type, there seem to be no way to have "just" a list of strings that should be replaced with a new string value.
(you can see our hopeless tryes in the video attached)

Any feedback?

I were creating that Project attached here, alongside with an Learning Video, I will link below and we did fail really badly to somehow get this working using the Methods we are told in the docs linked above.

MvuxListApp.zip

Note

The Video is German spoken, so for all non German speaking viewers of the Team maybe, I recommend activating the Video Live Transcription via Windows > Settings > Accessibility > Live Subtitles

https://technischekonstruktion-my.sharepoint.com/:v:/g/personal/info_technische-konstruktion_com/EQQtnI8rQ15HnNyZNdUNugcBSys3eMQ1a2KXdjB2RHgbSg?e=XpL890

See the above linked Note Box in the docs, which is not working as its not included in the TOC

It should be a very basic task, to be able to do this also, if the to be replaced Item is "just" a string != KeyEquality support not given. I is not making sense, to be required to encapsulate this just for that into a complex type e.g. record definition like Entity(string Name) we do get from the Template for transporting the Name from Main to Second Page.

Activity

  1. added
    kind/consumer-experience
    kind/documentation
    triage/untriaged
    on Aug 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/consumer-experiencekind/documentationtriage/untriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions