Closed zerodev1200 closed 1 month ago
Thank you, I've released 3.1.1, that fixed these issues.
2: I've implement Add operation for WritableNotifyCollectionChanged
Usage example:
IList<string?> bindable = view.ToWritableNotifyCollectionChanged((string? newView, Person original, ref bool setValue) =>
{
if (setValue)
{
// default setValue == true is Set operation
original.Name = newView;
// You can modify setValue to false, it does not set original collection to new value.
// For mutable reference types, when there is only a single,
// bound View and to avoid recreating the View, setting false is effective.
// Otherwise, keeping it true will set the value in the original collection as well,
// and change notifications will be sent to lower-level Views(the delegate for View generation will also be called anew).
setValue = false;
return original;
}
else
{
// default setValue == false is Add operation
return new Person { Age = null, Name = newView };
}
});
3: It is bug! I've fixed!
Thank you! However, I'm currently investigating because there's an exception occurring in WPF and it's not working properly...
I may have seen a glimmer of hope. I'll investigate a bit more and submit a PR...!
thanks, v3.3.0 includes your PR!
Issues with WritableView Implementation
1. Environment
2. Exception When Editing Empty Row in DataGrid
Issue Description
NotifyCollectionChangedSynchronizedViewList
Additional Observations
object? IList.this[int index]
3. Unexpected Behavior with WritableView Filter
Added the following code to
ObservableCollections.sandbox.ConsoleApp
Reproduction Code
Current Output
Expected Output
4. Related Improvements