Support

Account

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?