Skip to content

Commit

Permalink
fix(multi-sheet-tab): update last xml on content changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Niklas Kiefer authored and nikku committed Nov 22, 2018
1 parent c098ffe commit adfb1e2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions client/src/app/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ export class App extends Component {

await this.workspaceChanged();
await this.handleTabChanged(tab)();
await this.tabRef.current.triggerAction('set-last-xml', updatedFile.contents);
}

}
Expand Down
2 changes: 1 addition & 1 deletion client/src/app/__tests__/AppSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1314,7 +1314,7 @@ describe('<App>', function() {
dialog,
fileSystem
}
});
}, mount);

const openedTabs = await app.openFiles([ file1, file2 ]);

Expand Down
5 changes: 5 additions & 0 deletions client/src/app/tabs/MultiSheetTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,11 @@ export class MultiSheetTab extends CachedComponent {
const { fileType } = options;

return await editor.exportAs(fileType);
} else if (action === 'set-last-xml') {

this.setCached({
lastXML: options.xml
});
}

return editor.triggerAction(action, options);
Expand Down

0 comments on commit adfb1e2

Please sign in to comment.