damiengarbarino/dojo-calendar — Issue #5: renderItemToItem() called twice on item during edit end
Author: matt-dns
Created: 2012-03-07 00:37:54+00:00
State: open

in the ViewBase.js file, _endItemEditing() passes the edited item to _onItemEditEnd() like this:

```
this._onItemEditEnd(lang.mixin(this._createItemEditEvent(), {
item: this.renderItemToItem(p.editedItem, store),
eventSource: eventSource,
completed: !canceled
}));
```

but in _onItemEditEnd(), the data is put to the store with:

```
store.put(this.renderItemToItem(e.item, store));
```

This essentially runs renderItemToItem() on the item twice, which mucks up the data if non-standard field names are used.

I would have submitted a patch, but I'm not entirely sure which of them to remove. It looks like _onItemEditEnd() is only called from _endItemEditing(), so I'm assuming the store.put() line can have the renderItemToItem() function removed.