Skip to content

Commit

Permalink
flow
Browse files Browse the repository at this point in the history
  • Loading branch information
zurfyx committed Nov 27, 2024
1 parent 4100839 commit f43853d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/lexical-playground/src/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {HistoryPlugin} from '@lexical/react/LexicalHistoryPlugin';
import {HorizontalRulePlugin} from '@lexical/react/LexicalHorizontalRulePlugin';
import {ListPlugin} from '@lexical/react/LexicalListPlugin';
import {PlainTextPlugin} from '@lexical/react/LexicalPlainTextPlugin';
import {LexicalRetainSelection} from '@lexical/react/LexicalRetainSelection';
import {RetainSelection} from '@lexical/react/LexicalRetainSelection';
import {RichTextPlugin} from '@lexical/react/LexicalRichTextPlugin';
import {TabIndentationPlugin} from '@lexical/react/LexicalTabIndentationPlugin';
import {TablePlugin} from '@lexical/react/LexicalTablePlugin';
Expand Down Expand Up @@ -221,7 +221,7 @@ export default function Editor(): JSX.Element {
<CollapsiblePlugin />
<PageBreakPlugin />
<LayoutPlugin />
{retainSelection && <LexicalRetainSelection />}
{retainSelection && <RetainSelection />}
{floatingAnchorElem && !isSmallWidthViewport && (
<>
<DraggableBlockPlugin anchorElem={floatingAnchorElem} />
Expand Down
1 change: 1 addition & 0 deletions packages/lexical-react/flow/LexicalRetainSelection.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
/**
* LexicalRetainSelection
*/
declare export function RetainSelection(): null;
2 changes: 1 addition & 1 deletion packages/lexical-react/src/LexicalRetainSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext';
import {retainSelection} from '@lexical/utils';
import {useEffect} from 'react';

export function LexicalRetainSelection(): null {
export function RetainSelection(): null {
const [editor] = useLexicalComposerContext();
useEffect(() => {
return retainSelection(editor);
Expand Down

0 comments on commit f43853d

Please sign in to comment.