You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of the equality check in the IterableSignal class (which ListSignal extends) compares the iterable references instead of comparing the actual values of the iterable.
This behavior is expected when assigning a list using signal, but in my opinion using listSignal, or some of the other IterableSignals, this should be handled.
final value1 = [1, 2, 3];
final value2 = [1, 2, 3];
final list =listSignal(value1);
effect(() {
print('list changed');
print(list.value);
});
list.value = value2;
// prints: list changed// prints: [1,2,3]
Suggestions
Adapt our equality check within IterableSignal to align more with how collection functions are handled, thus ensuring a comparison based on the value.
Allow the provision of a specific equality function for each iterable signal function, enabling more flexible and customised evaluation.
The text was updated successfully, but these errors were encountered:
The current implementation of the equality check in the
IterableSignal
class (whichListSignal
extends) compares the iterable references instead of comparing the actual values of the iterable.This behavior is expected when assigning a list using
signal
, but in my opinion usinglistSignal
, or some of the otherIterableSignals
, this should be handled.Suggestions
The text was updated successfully, but these errors were encountered: