Skip to content

Commit

Permalink
fix(Descriptions): fix emptytext alway set error
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 committed Dec 12, 2023
1 parent f102d88 commit 85f1366
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/descriptions/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ export const FieldRender: React.FC<
request,
renderFormItem,
params,
emptyText,
} = props;
const form = ProForm.useFormInstance();

Expand All @@ -188,7 +189,7 @@ export const FieldRender: React.FC<
valueEnum,
mode: mode || 'read',
proFieldProps: {
emptyText: props.emptyText,
emptyText,
render: render
? (finText: string) => {
return render?.(finText, entity, index, action, {
Expand Down Expand Up @@ -506,6 +507,7 @@ const ProDescriptions = <
onLoadingChange,
actionRef,
onRequestError,
emptyText,
...rest
} = props;

Expand Down
1 change: 0 additions & 1 deletion tests/descriptions/__snapshots__/demo.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,6 @@ exports[`descriptions demos > 📸 renders ./packages/descriptions/src/demos/col
</div>
<div
class="ant-descriptions ant-pro-descriptions"
emptytext=""
>
<div
class="ant-descriptions-header"
Expand Down

0 comments on commit 85f1366

Please sign in to comment.