Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
atomrc committed Dec 19, 2023
1 parent a1674e8 commit 4705051
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/script/components/RichTextEditor/nodes/Mention.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,15 @@ import {
$setSelection,
CLICK_COMMAND,
COMMAND_PRIORITY_LOW,
GridSelection,
KEY_ARROW_LEFT_COMMAND,
KEY_ARROW_RIGHT_COMMAND,
KEY_BACKSPACE_COMMAND,
KEY_DELETE_COMMAND,
BLUR_COMMAND,
NodeKey,
NodeSelection,
RangeSelection,
$isRangeSelection,
$createRangeSelection,
BaseSelection,
} from 'lexical';

import {KEY} from 'Util/KeyboardUtil';
Expand All @@ -62,7 +60,7 @@ export const Mention = (props: MentionComponentProps) => {
const {mention, className = '', classNameFocused = '', nodeKey} = props;
const [editor] = useLexicalComposerContext();
const [isSelected, setSelected, clearSelection] = useLexicalNodeSelection(nodeKey);
const [selection, setSelection] = useState<RangeSelection | NodeSelection | GridSelection | null>(null);
const [selection, setSelection] = useState<BaseSelection | null>(null);
const isFocused = $isNodeSelection(selection) && isSelected;
const ref = useRef<HTMLSpanElement>(null);

Expand Down

0 comments on commit 4705051

Please sign in to comment.