I'm trying to use the
.igHierarchicalGrid("saveChanges", success, error) function and i think I've hit bug. When I use this function in a rest context it saves the changes correctly but callback functions are not called. After a bit of investigation in your code I found that the method_saveChangesForEachGrid() is called without parameter, but it has the success, error parameter in its definition:
Extract from the igHierarchicalGrid savechanges :
... var self = this, opts, elem = self.element, url = self.options.updateUrl, taLog = []; if ((this.options.rest || this.options.odata) && this.options.restSettings) { this._saveChangesForEachGrid(); return; ... }
_saveChangesForEachGrid definition:
... _saveChangesForEachGrid: function (success, error) { // will call each of the open layouts save changes instead of one full transaction log this.rootWidget().saveChanges(success, error); $.each(this.allChildrenWidgets(), function () { this.saveChanges(success, error); }); }, …
Steps to reproduce
Create a Rest igHierarchicalGrid
Enable RestSetting for update on each level
Modif some data
Call the .igHierarchicalGrid("saveChanges", function() {console.log("OK")},, function() {console.log("KO")});
Result
None of the callbacks are called.
Expected result
Callback functions should be called if sucess or error.
Question :
As I wait for a Fix can I modify the :
if ((this.options.rest || this.options.odata) && this.options.restSettings) {
this._saveChangesForEachGrid();
return;
to
if ((this.options.rest || this.options.odata) && this.options.restSettings) {
this._saveChangesForEachGrid(sucess,error);
return;
?
Thanks
Description
Describe the issue.
I'm trying to use the .igHierarchicalGrid("saveChanges", success, error) function and i think I've hit bug. When I use this function in a rest context it saves the changes correctly but callback functions are not called. After a bit of investigation in your code I found that the method_saveChangesForEachGrid() is called without parameter, but it has the success, error parameter in its definition:
Extract from the igHierarchicalGrid savechanges :
... var self = this, opts, elem = self.element, url = self.options.updateUrl, taLog = []; if ((this.options.rest || this.options.odata) && this.options.restSettings) { this._saveChangesForEachGrid(); return; ... }
_saveChangesForEachGrid definition:... _saveChangesForEachGrid: function (success, error) { // will call each of the open layouts save changes instead of one full transaction log this.rootWidget().saveChanges(success, error); $.each(this.allChildrenWidgets(), function () { this.saveChanges(success, error); }); }, …
Steps to reproduce
Result
None of the callbacks are called.
Expected result
Callback functions should be called if sucess or error.
Question :
As I wait for a Fix can I modify the : if ((this.options.rest || this.options.odata) && this.options.restSettings) { this._saveChangesForEachGrid(); return; to if ((this.options.rest || this.options.odata) && this.options.restSettings) { this._saveChangesForEachGrid(sucess,error); return; ? Thanks