Skip to content

Commit

Permalink
fix(table): less render function
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 committed Nov 3, 2023
1 parent e547a62 commit b314a37
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/table/src/components/EditableTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ function EditableTable<
...restButtonProps
} = recordCreatorProps || {};
const isTop = position === 'top';

const creatorButtonDom = useMemo(() => {
if (typeof maxLength === 'number' && maxLength <= value?.length) {
return false;
Expand Down Expand Up @@ -358,7 +359,7 @@ function EditableTable<
)
);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [recordCreatorProps, maxLength, value?.length]);
}, [recordCreatorProps == false, maxLength, value?.length]);

const buttonRenderProps = useMemo(() => {
if (!creatorButtonDom) {
Expand Down

0 comments on commit b314a37

Please sign in to comment.