We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
useSelect
1 parent 3c57dcb commit 63a7452Copy full SHA for 63a7452
packages/block-editor/src/hooks/use-bindings-attributes.js
@@ -109,6 +109,11 @@ export const withBlockBindingSupport = createHigherOrderComponent(
109
),
110
[ props.attributes.metadata?.bindings, name ]
111
);
112
+
113
+ // While this hook doesn't directly call any selectors, `useSelect` is
114
+ // used purposely here to ensure `boundAttributes` is updated whenever
115
+ // there are attribute updates.
116
+ // `source.getValues` may also call a selector via `registry.select`.
117
const boundAttributes = useSelect( () => {
118
if ( ! bindings ) {
119
return;
0 commit comments