Skip to content

Conversation

tcoopman
Copy link
Contributor

@tcoopman tcoopman commented Mar 4, 2015

I tried to add some methods to the Cursor API because they are missing. This solves #346.

I'm not sure if this is the right way to do it, because all other methods extend both KeyedCursorPrototype and IndexedCursorPrototype and this only extends IndexedCursorPrototype. So all feedback is more then welcome!

@natew
Copy link

natew commented Mar 5, 2015

This is big for me, really hinders ability to use of cursors until this is fixed! 👍 👍

@tcoopman
Copy link
Contributor Author

tcoopman commented Mar 5, 2015

@natew If there are other methods that are missing, let me know, I'm happy to implement them too.

@zen0wu
Copy link

zen0wu commented Mar 8, 2015

wow, this is so great, exactly the things I need. Can't wait for it

leebyron added a commit that referenced this pull request Mar 27, 2015
added List methods push, pop, unshift, shift to List IndexedCursor
@leebyron leebyron merged commit 64eb617 into immutable-js:master Mar 27, 2015
@leebyron
Copy link
Collaborator

Nice work, thanks for your patience!

@natew
Copy link

natew commented Mar 30, 2015

I'm not sure how to push regular JS items onto an immutable cursor List, this doesn't work:

immutableStore.push.apply(null, jsarray);

I've tried a few variations I keep getting:

Possibly unhandled TypeError: Cannot read property 'updateIn' of undefined
    at updateCursor (webpack:///./~/immutable/contrib/cursor/index.js?:279:37)

@tcoopman
Copy link
Contributor Author

@natew can you give a full testcase? Somewhere as a gist or something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants