-
Notifications
You must be signed in to change notification settings - Fork 295
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
Single selection doesn't work with Memory store #61
Comments
I'm unable to reproduce this in What version of dgrid are you using? Do you see any errors in firebug / dev tools when selecting? Would you be able to either gist or host a complete isolated test page reproducing the issue? |
I'm using dgrid 0.2.0 and dojo 1.7.1. Web Inspector's and Firebug's consoles don't show any errors. This is my code. Unfortunately, my server is down so I can't host it now. |
That tarball seems to be corrupted/incomplete. Can you try packing and uploading it again? |
Sorry. I checked this one and it's working on my Ubuntu. |
jesus-crysist, the problem is that you are using: id: +new Date for your row id. Because each row is being created in the same second, all of the row ids are the same. The id for each row needs to be unique, this is causing selection to fail because it doesn't know which row to unselect after the first. If you don't have an identifier to use, just use a random number. :) |
Thanks. When I set store's idProperty it worked like a charm. I should've known not to use Date as IDs. :/ |
Using simple array and inserting data into the grid with renderArray() method and setting selectionMode to 'single' it behaves like it should (only one row can be selected at the time).
But when switching to dojo's Memory object store ( code ), single row selection is broken.
The text was updated successfully, but these errors were encountered: