-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Query Loop Block ] Only show the Filters panel when there are allowed controls that need to be displayed #45869
Conversation
Open in CodeSandbox Web Editor | VS Code | VS Code Insiders |
Size Change: +27 B (0%) Total Size: 1.32 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @ryanwelcher! Some small changes and we can land.
packages/block-library/src/query/edit/inspector-controls/index.js
Outdated
Show resolved
Hide resolved
@ntsekouras this is ready for review. Thanks! |
… for each section.
6894379
to
4fa1681
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Ryan! Looks good!
What?
This PR addresses #45864 by checking that allowedControls contain at least one of the items that exist under the Filters panel before rendering it.
Why?
Without this check, it is possible to render an empty Filters panel
Testing Instructions
See steps to reproduce in #45864