Skip to content

Connect, collaborate, and grow with a community of TypeScript developers

fix: inlay not updating when switching event to event (#1690)

Tylerd1e39ce3e5f6
diff --git a/packages/monaco/src/split-editor.tsx b/packages/monaco/src/split-editor.tsx
index ada56644..cf0d10c3 100644
--- a/packages/monaco/src/split-editor.tsx
+++ b/packages/monaco/src/split-editor.tsx
@@ -309,6 +309,13 @@ export default function SplitEditor({
}, 1000),
).current;
+ useEffect(
+ () => () => {
+ inlayHintsRef.current?.dispose();
+ },
+ [],
+ );
+
return (
<div className={clsx('flex h-[calc(100%-_90px)] flex-col', className)} ref={wrapper}>
<section