MCPcopy Create free account
hub / github.com/DTStack/molecule / toggleEditorStatus

Method toggleEditorStatus

stories/extensions/test/testPane.tsx:230–239  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

228 };
229
230 const toggleEditorStatus = () => {
231 const { current } = molecule.editor.getState();
232 if (current?.tab) {
233 molecule.editor.updateTab({
234 id: current.tab.id,
235 status:
236 current.tab.status === 'edited' ? undefined : 'edited',
237 });
238 }
239 };
240
241 const updateEditor = function () {
242 // get first inactive tab

Callers

nothing calls this directly

Calls 2

getStateMethod · 0.80
updateTabMethod · 0.65

Tested by

no test coverage detected