Skip to content

Commit

Permalink
useMemo
Browse files Browse the repository at this point in the history
  • Loading branch information
ivailop7 committed Oct 15, 2024
1 parent 6169029 commit 28e0492
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
} from '@lexical/table';
import {$findMatchingParent, mergeRegister} from '@lexical/utils';
import {$getNearestNodeFromDOMNode, NodeKey} from 'lexical';
import {useEffect, useRef, useState} from 'react';
import {useEffect, useMemo, useRef, useState} from 'react';
import * as React from 'react';
import {createPortal} from 'react-dom';

Expand Down Expand Up @@ -134,7 +134,7 @@ function TableHoverActionsContainer({

// Hide the buttons on any table dimensions change to prevent last row cells
// overlap behind the 'Add Row' button when text entry changes cell height
const tableResizeObserver = React.useMemo(() => {
const tableResizeObserver = useMemo(() => {
return new ResizeObserver(() => {
setShownRow(false);
setShownColumn(false);
Expand Down

0 comments on commit 28e0492

Please sign in to comment.