Skip to content

Commit

Permalink
fix(form): hide field groups where all fields are hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoerge committed Apr 20, 2023
1 parent 755c337 commit fcfe3a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/sanity/src/core/form/store/formState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ function prepareObjectInputState<T>(
castArray(memberWithHiddenState.group).includes(group.name)
)
})
return hasMembers ? group : {...group, disabled: true}
return hasMembers ? group : []
})
: []

Expand Down

2 comments on commit fcfe3a8

@vercel
Copy link

@vercel vercel bot commented on fcfe3a8 Apr 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

performance-studio – ./

performance-studio.sanity.build
performance-studio-git-next.sanity.build

@vercel
Copy link

@vercel vercel bot commented on fcfe3a8 Apr 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

test-studio – ./

test-studio-git-next.sanity.build
test-studio.sanity.build

Please sign in to comment.