How can I mark the current EditorComponent tab as "dirty"? #2070
Replies: 2 comments 2 replies
-
And how to clear the dirty state afterwards? I think I'll put it here, is it alright? 😅 registry.registerEditorComponentResolver('file', (resource, results) => {
results.push({
saveResource: async (resource, reason) => {
// clear dirty state here |
Beta Was this translation helpful? Give feedback.
-
Hi @nguyenhongphat0, As I know, you can use the Some code samples on core/packages/keymaps/src/browser/keymaps.contribution.ts Lines 152 to 154 in 7144fa4 You can register a resource provider to handle the tab 'dirty' state by defining a getResourceDecoration() {
return {
dirty: true,
};
} hope this can help you. |
Beta Was this translation helpful? Give feedback.
-
I'm following this guide to create a custom editor component for my IDE. How can I mark the current editor as dirty when the user updates these form fields (like when the text content of the file has changed 👇)
Thank you for your help 🙏
Beta Was this translation helpful? Give feedback.
All reactions