Skip to content

Commit

Permalink
fix: remove the updateTab action
Browse files Browse the repository at this point in the history
  • Loading branch information
wewoor committed May 25, 2021
1 parent e09f07d commit a95e4db
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions stories/extensions/test/testPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,35 +89,35 @@ export type GenericClassDecorator<T> = (target: T) => void;`,
};

molecule.editor.onUpdateTab((newTab) => {
const { current } = molecule.editor.getState();
const tab = current?.tab!;
molecule.editor.updateTab(
{
id: tab.id,
data: {
...tab.data,
modified: true,
},
},
current?.id || -1
);
// TODO editorService add onSaveEditor() event.
current?.editorInstance.addCommand(
monaco.KeyMod.CtrlCmd | monaco.KeyCode.KEY_S,
() => {
// ctrl + s
molecule.editor.updateTab(
{
id: tab.id,
data: {
...tab.data,
modified: false,
},
},
current?.id || -1
);
}
);
// const { current } = molecule.editor.getState();
// const tab = current?.tab!;
// molecule.editor.updateTab(
// {
// id: tab.id,
// data: {
// ...tab.data,
// modified: true,
// },
// },
// current?.id || -1
// );
// // TODO editorService add onSaveEditor() event.
// current?.editorInstance.addCommand(
// monaco.KeyMod.CtrlCmd | monaco.KeyCode.KEY_S,
// () => {
// // ctrl + s
// molecule.editor.updateTab(
// {
// id: tab.id,
// data: {
// ...tab.data,
// modified: false,
// },
// },
// current?.id || -1
// );
// }
// );
});
let notify;
const addANotification = function () {
Expand Down

0 comments on commit a95e4db

Please sign in to comment.