Custom block update rendering when reused #16614
Labels
[Feature] Block API
API that allows to express the block paradigm.
[Feature] Synced Patterns
Related to synced patterns (formerly reusable blocks)
[Type] Bug
An existing feature does not function as intended
I developed a custom (Gutenberg) block that have to update is content on almost every block manipulation on the block editor.
It works great, mostly: i "listen" to changes with a
wp.data.subscribe
function and update the block attributes withwp.data.dispatch( 'core/block-editor' ).updateBlockAttributes
.The problem is that the blocks stop updating when converted to a reusable block or put in one (like a reusable group). It's fine in the reusable block manager, but the feature that let you edit a reusable block inside the post it is used on is like a frame that don't fire my wp.data.subscribe function.
How do i check for modifications in this "window" and update blocks inside it?
It's just a backend problem. The client side rendering is dynamic so it works fine.
I've searched a lot, and asked here ( where you can also find the code) : https://wordpress.stackexchange.com/questions/342753/custom-block-update-rendering-when-reused.
I'm an experienced WP developer, but pretty new to React so sorry if my vocabulary is off...
Thank you,
The text was updated successfully, but these errors were encountered: