diff --git a/apps/remix-ide/src/app/files/fileManager.js b/apps/remix-ide/src/app/files/fileManager.js index 3bd4489c49..fae8bdc51e 100644 --- a/apps/remix-ide/src/app/files/fileManager.js +++ b/apps/remix-ide/src/app/files/fileManager.js @@ -141,6 +141,7 @@ class FileManager extends Plugin { const provider = this.fileProviderOf('/') // emit rootFolderChanged so that File Explorer reloads the file tree provider.event.emit('rootFolderChanged', provider.workspace || '/') + this.emit('rootFolderChanged', provider.workspace || '/') } /** diff --git a/libs/remix-ui/workspace/src/lib/actions/events.ts b/libs/remix-ui/workspace/src/lib/actions/events.ts index 35beea2f39..0f9d7ba29f 100644 --- a/libs/remix-ui/workspace/src/lib/actions/events.ts +++ b/libs/remix-ui/workspace/src/lib/actions/events.ts @@ -41,6 +41,10 @@ export const listenOnPluginEvents = (filePanelPlugin) => { plugin.on('remixd', 'rootFolderChanged', async (path: string) => { rootFolderChanged(path) }) + + plugin.on('fileManager', 'rootFolderChanged', async (path: string) => { + rootFolderChanged(path) + }) } export const listenOnProviderEvents = (provider) => (reducerDispatch: React.Dispatch) => {