knockout / knockout

Knockout makes it easier to create rich, responsive UIs with JavaScript
http://knockoutjs.com/
Other
10.44k stars 1.52k forks source link

BugFix - Should not fire subscribers if date still the same #2528

Closed vinipickrodt closed 4 years ago

mbest commented 4 years ago

If you want this type of equality, you can set your own function for equality:

ko.observable.fn.equalityComparer = ...

Similarly for ko.computed.

vinipickrodt commented 4 years ago

If you want this type of equality, you can set your own function for equality:

ko.observable.fn.equalityComparer = ...

Similarly for ko.computed.

Okay, but the default equalityComparer sees same Date objects as being different. Is this behavior right?

mbest commented 4 years ago

The comparison is mainly meant for optimization. And you can customize it as you like.