Skip to content
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

Row insertion #1042

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

benjaminsonday
Copy link

A few changes:

  • Added example of a simple row insertion, as it took me a little while to figure it out (but perhaps I'm just slow 😄 )
  • Added function ensureIdAndThatItDoesNotExistto slick.dataview.js, and call it whenever we add a new row. Without this function, many rows will be assigned to the same key in the idxById map (so they will overwrite each other), and idxById will only contain the idx of the most recently added row with that id. This screws other things up; e.g., upon a call to deleteItem, only the most recently added row with this id will be deleted. Better to fail loudly the first time a duplicate id is added, I believe.

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.

1 participant