[ui-grid 3.0.0-rc16] Row is not marked dirty after cell edit
The examples seem to work properly, but in my code, I am required to double-click another cell (start edit of another cell), before the current row is marked as "dirty". The 205 tutorial only requires a single click, which is what I want. I will post a plukr soon. I am not sure what I am doing wrong, as I've been looking at this for a while. But I think it is that my files are organized differently
Here's the beginning of the plunkr: http://plnkr.co/edit/2A7jsaCZvBRu8iV615F1
But I am not done with my plunkr. I'm still not sure why 205 sample works and mine doesn't. My code runs, and I see the grid (on my local development system). The only thing not working is marking the row dirty simply clicking once off the just-edited cell.
OK, I finally got the expected behavior working, but I had to explicitly set the dirty flag on each row in the on.afterCellEdit callback that I defined. In the Tutorial, it is implied we need to do this when we define our own on afterCellEdit callback (tutorial 205):
"The basic method of operation is that whenever a cell is edited (identified using the edit.afterCellEdit event) an isDirty flag is set on the row, and a saveTimer is set."
HOWEVER, I was previously provided this plunkr: http://plnkr.co/edit/SwztnW1mpIlg1oDuqWjI
by @PaulL1
where he does NOT need to define an afterCellEdit callback at all, and it works as expected. When you double-click a cell and edit, and then single click any other cell, the row is marked dirty as expected (note we are using rowWaitEditInterval = -1 for my use case).
The code I have (running 3.0.0-rc16) doesn't work that way though I'm doing the same thing. Could it be that perhaps @PaulL1 is running off of "latest" which has a fix that my version of ui-grid doesn't?
That's only explanation I can put together here. I guess in the meantime, I can continue explicitly call setRowsDirty for each modified row, until there's an explanation for the discrepancy in behavior. I'll try and update my provide plunkr so you can compare.
In the plunker you provided when I edit a cell the row gets marked dirty. I can't see any reason why this wouldn't work - the afterCellEdit event is called within the rowEdit feature itself.
Is this still happening for you, and if so could you provide an updated plunker?
Yes it is still happening to me @PaulL1 . I've been working around it by explicitly calling "setRowsDirty" in the afterCellEdit callback.
I was thinking maybe you are on a more recent build then I am, and that would account for the discrepancy....but I can't confirm that with plunkr down. I'll update again once I can get plunkr up and running again.
Solution offered 2 weeks ago, no comments since, assuming original issue resolved.