Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: workspace add onFileChange event callback #50

Merged
merged 3 commits into from
Oct 31, 2023
Merged

feat: workspace add onFileChange event callback #50

merged 3 commits into from
Oct 31, 2023

Conversation

BoBoooooo
Copy link
Contributor

新增工作区文件变更回调

const workspace = new Workspace({
  entry: '/src/index.js',
  files: sampleFiles,
  onFileChange: (_workspace: IWorkspace) => {
    console.log('onFileChange', _workspace.files);
  },
});

@@ -497,7 +497,7 @@ export interface CodeSandboxProps {
iframeId?: string;

eventHandlers?: EventHandlers;
onFileChange?: (files: IFiles, sandpack: ISandpackContext) => void;
onFilesChange?: (files: IFiles, sandpack: ISandpackContext) => void;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个要改回来

@wwsun wwsun merged commit d775a50 into NetEase:main Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants