Skip to content

Commit

Permalink
fix(form): fix block when QueryFilter set grid
Browse files Browse the repository at this point in the history
close #6867
  • Loading branch information
chenshuai2144 committed Jun 24, 2023
1 parent a27d453 commit 393fbe8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/form/src/layouts/LightFilter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ function LightFilter<T = Record<string, any>>(props: LightFilterProps<T>) {
return (
<LightFilterContainer
prefixCls={prefixCls}
items={items.flatMap((item: any) => {
items={items?.flatMap((item: any) => {
/** 如果是 ProFormGroup,直接拼接dom */
if (item?.type.displayName === 'ProForm-Group')
return item.props.children;
Expand Down
2 changes: 1 addition & 1 deletion packages/form/src/layouts/QueryFilter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ const flatMapItems = (
items: React.ReactNode[],
ignoreRules?: boolean,
): React.ReactNode[] => {
return items.flatMap((item: any) => {
return items?.flatMap((item: any) => {
if (item?.type.displayName === 'ProForm-Group' && !item.props?.title) {
return item.props.children;
}
Expand Down

0 comments on commit 393fbe8

Please sign in to comment.