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

selection not reset after a remove #98

Closed
bwa opened this issue Feb 22, 2012 · 1 comment
Closed

selection not reset after a remove #98

bwa opened this issue Feb 22, 2012 · 1 comment

Comments

@bwa
Copy link

bwa commented Feb 22, 2012

I have created a rest based grid and do a remove on a selected row in the grid. The DELETE is executed on the store and the row is removed form the grid, but still the grid.selection is ponting to the removed row.

The code is very simple to reproduce:

        on(document.getElementById("delete"), "click", function(){
                    for(var id in grid.selection){
                        var x = prompt("Do you want to delete id: " + id+ "? Type OK in the prompt field to confirm");
                        if(x==="OK")
                            restStore.remove(id);
                    }
        });         

This works fine the first attempt, but the next attempt, without selecting any new row, it still tries to delete the same row as before and actually a new DELETE is sendt to the rest store.

I think the bug is that grid.selection should be empty after the first delete.

@ghost
Copy link

ghost commented Feb 23, 2012

This should be resolved by #101; note however that we've also changed the nature of select and deselect events to fire a batch event passing an array of affected rows or cells, instead of firing many events each with a singular row or cell.

Let us know if you still have issues. Thanks!

@ghost ghost closed this as completed Feb 23, 2012
This issue was closed.
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

No branches or pull requests

1 participant