修复自动伸缩文本框代码检查
Project CI / Repository checks (pull_request) Successful in 57s
Project CI / Frontend tests (pull_request) Failing after 2m4s
Project CI / Backend tests (pull_request) Successful in 3m35s
Project CI / Native shell tests (pull_request) Has been cancelled

整理 AutoGrowTextArea 导入顺序

补齐初始化配置的 Hook 依赖
This commit is contained in:
2026-08-07 21:58:03 +08:00
parent b61687b0f7
commit f5fa2fd6f8
+5 -4
View File
@@ -1,6 +1,8 @@
import { ContentEditable } from '@lexical/react/LexicalContentEditable';
import 'overlayscrollbars/styles/overlayscrollbars.css';
import { LexicalComposer } from '@lexical/react/LexicalComposer';
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
import { ContentEditable } from '@lexical/react/LexicalContentEditable';
import { LexicalErrorBoundary } from '@lexical/react/LexicalErrorBoundary';
import { HistoryPlugin } from '@lexical/react/LexicalHistoryPlugin';
import { PlainTextPlugin } from '@lexical/react/LexicalPlainTextPlugin';
@@ -17,12 +19,11 @@ import {
COMPOSITION_START_COMMAND,
INSERT_LINE_BREAK_COMMAND,
KEY_ENTER_COMMAND,
PASTE_COMMAND,
type LexicalEditor,
PASTE_COMMAND,
} from 'lexical';
import type { PartialOptions } from 'overlayscrollbars';
import { useOverlayScrollbars } from 'overlayscrollbars-react';
import 'overlayscrollbars/styles/overlayscrollbars.css';
import {
type CSSProperties,
useCallback,
@@ -309,7 +310,7 @@ export function AutoGrowTextArea({
},
}),
// LexicalComposer intentionally reads its initial configuration once.
[],
[disabled, readOnly],
);
const resolvedClassName = [
'auto-grow-text-area',