-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Observe Events on forceHasSwapped #73
Comments
That observer wouldn't be called unless there's a true change. It's not being call because of this line: Line 98 in d22d54c
Your failing test at blittle@a8c1f0f is correct behaviour. |
@dashed so I think my problem is the version that is published on NPM seems substantially different than the master branch here. When I run off of master, I don't have any problems. |
Ah yeah. v1.4.1 doesn't have the overhauled event propagation for reference cursors: https://github.com/omniscientjs/immstruct/blob/v1.4.1/src/structure.js Overhaul came from here #60 |
Yeah, I've marked the |
@blittle Yeah, it was something I wanted as well. I originally reported this in #37 IMO, master seems pretty stable. Offtopic: @mikaelbr Is this the branch you're working on for omniscient? https://github.com/omniscientjs/omniscient/tree/next |
I consider it stable as well. One thing I have in mind is this #60 (comment). Only reason I haven't published a new release is to have into consideration if the API should change if there is something we discover during the Omniscient fixes - but as for now, I don't predict any massive changes in Omniscient. Maybe not even a major version bump.
Originally, yes. But that is for testing with |
Ah yeah. I found #60 (comment) to be quite important via a custom cursor implementation. Since you have knowledge of the keypaths (through ref cursors), you should only care about what changed in those keypaths. If you really wanted to, you can wrap to mimic the const cursorCompare = curry(cursorCompare);
const makeEquals = function(obj) {
const curried = cursorCompare(obj);
return {
equals(obj2) {
return curried(obj2);
}
};
}; That way you can maintain whatever patterns you're trying to achieve, no? |
Should calling
forceHasSwapped
forcibly trigger a swap event for observing reference cursors?For example:
Currently it does not appear as though it is getting called.
The text was updated successfully, but these errors were encountered: