Closed karthikr-vti closed 8 months ago
I had previously created extension methods like this. https://github.com/runceel/ReactiveProperty/blob/6808dc5abfb55feef695399a12295ad7d31be49c/Source/ReactiveProperty.NETStandard/Extensions/CombineLatestEnumerableExtensions.cs#L16
I think you probably want to do something similar, but it certainly feels like it's become more difficult to implement it straightforwardly in R3 compared to Rx. Let me adjust it a bit.
Thank you for the response.
Given this scenario, how would the CombineLatest Observable be in sync with the list? Since it only accepts IEnumerable<>, any modifications to the list after CombineLatest won’t be reflected, and running it again would create a new IObservable
Converting to IEnumerable in the constructor and using CombineLatest doesn't handle dynamic changes for constructing ReadOnlyReactiveProperty. This is more of a collection issue rather than Rx or R3. You can certainly do it manually, but if you want something that handles everything automatically, DynamicData likely has a solution for that.
How to combine a list of class with a ReactiveProperty and create a new property?
For example:
But this would only combine operations list during the time of construction.
My current approach is to have a new backend property and recreate subscription on every list update:
Is there any easier way to do this?