Skip to content

Commit e30d5e3

Browse files
committed
fix: restore lammpsOutput dependency in Console useEffect
- Biome incorrectly removed lammpsOutput from dependency array - Effect needs to run when output changes to auto-scroll console - Fixes regression in console auto-scrolling behavior
1 parent dc27712 commit e30d5e3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/containers/Console.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const Console = ({ width, height }: ConsoleProps) => {
1919
readOnly: true,
2020
};
2121

22+
// biome-ignore lint/correctness/useExhaustiveDependencies: lammpsOutput is needed to trigger scroll when output changes
2223
useEffect(() => {
2324
const editor = editorRef.current;
2425
if (editor) {
@@ -27,7 +28,7 @@ const Console = ({ width, height }: ConsoleProps) => {
2728
editor.revealLine(model.getLineCount());
2829
}
2930
}
30-
}, []);
31+
}, [lammpsOutput]);
3132

3233
const handleEditorDidMount = (editor: Monaco.editor.IStandaloneCodeEditor) => {
3334
editorRef.current = editor;

0 commit comments

Comments
 (0)