Skip to content

Commit

Permalink
add useMemo to isCellCompletelyValid
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquesikot committed Aug 15, 2024
1 parent a1861ef commit 874a636
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,10 @@ export const DateCell = (props: DateComponentProps) => {
const [isValid, setIsValid] = useState(true);
const [showRequiredError, setShowRequiredError] = useState(false);
const contentRef = useRef<HTMLDivElement>(null);
const isCellCompletelyValid = isEditableCellValid && isValid;
const isCellCompletelyValid = useMemo(
() => isEditableCellValid && isValid,
[isEditableCellValid, isValid],
);

const valueInISOFormat = useMemo(() => {
if (typeof value !== "string") return "";
Expand Down

0 comments on commit 874a636

Please sign in to comment.