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

SaveChanges callback function on a hiearchical grid #2228

Closed
IsiAymeric opened this issue Mar 28, 2023 · 1 comment
Closed

SaveChanges callback function on a hiearchical grid #2228

IsiAymeric opened this issue Mar 28, 2023 · 1 comment
Assignees
Labels

Comments

@IsiAymeric
Copy link

Description

Describe the issue.

  • ignite-ui version: 22.2
  • browser: any
    Hello,

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

  1. Create a Rest igHierarchicalGrid
  2. Enable RestSetting for update on each level
  3. Modif some data
  4. 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

@IsiAymeric IsiAymeric added the bug label Mar 28, 2023
@dkamburov dkamburov self-assigned this Mar 29, 2023
@MayaKirova MayaKirova self-assigned this Nov 28, 2023
@dkamburov
Copy link
Contributor

Fix was merged to the code base

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants