diff --git a/packages/block-editor/src/components/block-bindings/attribute-control.js b/packages/block-editor/src/components/block-bindings/attribute-control.js index b92ae3abbfe696..62c1bbf901b8d8 100644 --- a/packages/block-editor/src/components/block-bindings/attribute-control.js +++ b/packages/block-editor/src/components/block-bindings/attribute-control.js @@ -50,10 +50,15 @@ export default function BlockBindingsAttributeControl( { getBlockType, } = unlock( select( blocksStore ) ); - const _attributeType = - getBlockType( blockName ).attributes?.[ attribute ]?.type; + const _attribute = + getBlockType( blockName ).attributes?.[ attribute ]; + + if ( _attribute?.enum ) { + return {}; + } + const attributeType = - _attributeType === 'rich-text' ? 'string' : _attributeType; + _attribute?.type === 'rich-text' ? 'string' : _attribute?.type; const sourceFields = {}; Object.entries( getAllBlockBindingsSources() ).forEach( diff --git a/packages/e2e-tests/plugins/server-side-rendered-block.php b/packages/e2e-tests/plugins/server-side-rendered-block.php index 29962e90798318..28dc70af756080 100644 --- a/packages/e2e-tests/plugins/server-side-rendered-block.php +++ b/packages/e2e-tests/plugins/server-side-rendered-block.php @@ -91,7 +91,7 @@ static function () { add_filter( 'block_bindings_supported_attributes_test/auto-register-with-controls', static function () { - return array( 'title', 'count', 'spacing', 'showEmojis' ); + return array( 'title', 'count', 'spacing', 'showEmojis', 'emoji' ); } );