angular-ui / ui-grid

UI Grid: an Angular Data Grid
http://ui-grid.info
MIT License
5.39k stars 2.47k forks source link

row edit with uneditable cell doesn't fire save event... #3542

Open cleon26 opened 9 years ago

cleon26 commented 9 years ago

Hello again,

Please see this plnkr:

http://plnkr.co/edit/Oj0IeJubS7biWf9bhgVI?p=preview

Take a look at the first grid:

  1. Press the add row button.
  2. Edit the name and press tab
  3. Edit the gender and press tab
  4. Edit the age and press tab
  5. Notice that the grid saves the data...

Repeat the same steps in the second grid... The only difference is that the "age" column is not editable. Notice that the row save event doesn't fire after tabbing away from the bottom/rightmost cell if it's not editable.

I've tried this same code inserting the by inserting the blank item at the top and it works in both cases...

Am I doing something incorrectly here or is this a bug?

PaulL1 commented 9 years ago

I think it's a bug, but a very obscure one.

In example one the rowEdit is triggered by endCellEdit, because the last cell is editable.

In example two there isn't an endCellEdit on the last cell, because it's not editable. So we're relying on a navigate event being raised. It looks like a navigate event isn't raised when you navigate out of the grid. @swalters, do you know if we raise navigate events for leaving the grid?