Home › Forums › Gutenberg › onChange metabox -> update style Gutenberg block › Reply To: onChange metabox -> update style Gutenberg block
@tatof thanks for bringing this up on ACF Chat Fridays today.
Firing off the ACF render_block_preview
action won’t actually cause a re-render of the preview, it happens after the render has already happened, and is typically used for re-initializing custom JS (i.e. jQuery, etc). after a preview has been updated.
ACF should automatically fetch a new block when the block state is updated (and in my testing your call to updateBlockAttributes()
is doing that), however the preview will only update if the returned HTML is different than what ACF already has from the last fetch (or preload).
Could you please clarify if the googleRev
attribute being updated via updateBlockAttributes()
is an ACF field on the block itself?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.