Skip to content

Commit

Permalink
fix: fix monaco editor auto size not working (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZLY201 authored Oct 27, 2023
1 parent 6c63668 commit 795624a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/AutoResizer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function decorateWithAutoResize<T>(
height: newHeight,
};
});
}, 200);
}, 100);
window.addEventListener('resize', updateSize, { passive: true });
const interval = setInterval(updateSize, 200);
return function () {
Expand Down

0 comments on commit 795624a

Please sign in to comment.