diff --git a/packages/block-editor/src/components/inspector-controls-tabs/index.js b/packages/block-editor/src/components/inspector-controls-tabs/index.js index 76252bae975ae4..ef128cf0a94649 100644 --- a/packages/block-editor/src/components/inspector-controls-tabs/index.js +++ b/packages/block-editor/src/components/inspector-controls-tabs/index.js @@ -23,6 +23,7 @@ export default function InspectorControlsTabs( { clientId, hasBlockStyles, tabs, + block, } ) { // The tabs panel will mount before fills are rendered to the list view // slot. This means the list view tab isn't initially included in the @@ -52,7 +53,10 @@ export default function InspectorControlsTabs( { ) ) } - + ( - <> - - - { showAdvancedControls && ( -
- -
- ) } - - -); +function SettingsTab( { showAdvancedControls = false, block } ) { + const hasBindings = block?.attributes?.metadata?.bindings + ? Object.keys( block.attributes.metadata.bindings ).length > 0 + : false; + + return ( + <> + { hasBindings && } + + + { showAdvancedControls && ( +
+ +
+ ) } + + + ); +} export default SettingsTab;