-
Notifications
You must be signed in to change notification settings - Fork 56
Description
On which page?
uno.extensions/doc/Learn/Mvux/ListStates.md
Lines 130 to 133 in 48d100b
> [!TIP] | |
> You don't have to implement `IKeyEquatable<T>` by yourself, see [generation](xref:Uno.Extensions.Equality.concept#generation) for more information. | |
uno.extensions/doc/Learn/Mvux/ListStates.md
Lines 155 to 167 in 48d100b
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.
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
See the above linked Note Box in the docs, which is not working as its not included in the TOC
- [Docs] PropertySelector and KeyEqualityComparer not listed in the TOC #2831
If we are searching via search box for KeyEquality we do land on these non-connected Pages, but these docs are not helpfull for solving this problem.
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.