I am using ACF Pro 5.8.0-beta3 and registered a custom block using acf_register_block(). I’ve created a repeater field with a Post Object sub-field and assigned it to the custom block. Everything shows up as expected on the front-end and back-end when using the custom block in a Page/Post.
However, I’m noticing an issue when I have the maximum rows set to “3” and the minimum rows set to “3”. If I add the custom block to a Page and choose my desired Posts in the repeater, I am not able to change the order of the rows and have that change save properly; instead the original order that I selected the Posts is retained. If I edit the repeater field and set the minimum rows to “0” then I can change the order and save it just fine.
Is this something that y’all can reproduce on your end?
Cheers,
Kory
I’m seeing this same behavior. But it doesn’t work even after I remove the minimum rows requirement.
EDIT: After I remove the minimum rows requirement, I can rearrange the blocks with the exception of the first block. It always remains first.
Here’s what the POST to admin_ajax.php looks like. For some reason, the first item has a [0]
array key but the subsequent items appear to have hashed keys.
action: acf/ajax/render_block_preview
block[id]: block_5c5a09cdd6c41
block[data][field_5c59f6ad04f2e][0][field_5c59f6ad0803b]: 4955
block[data][field_5c59f6ad04f2e][0][field_5c59f745b0c76]: The Distillers League of Alabama logo
block[data][field_5c59f6ad04f2e][0][field_5c59f6ad08084]: #f4f4f4
block[data][field_5c59f6ad04f2e][5c5a09ead6c42][field_5c59f6ad0803b]: 4953
block[data][field_5c59f6ad04f2e][5c5a09ead6c42][field_5c59f745b0c76]: Shoal Creek logo
block[data][field_5c59f6ad04f2e][5c5a09ead6c42][field_5c59f6ad08084]: #a6a5a5
block[data][field_5c59f6ad04f2e][5c5a0a03d6c43][field_5c59f6ad0803b]: 4945
block[data][field_5c59f6ad04f2e][5c5a0a03d6c43][field_5c59f745b0c76]: Attune Health logo
block[data][field_5c59f6ad04f2e][5c5a0a03d6c43][field_5c59f6ad08084]: #aaad00
block[data][field_5c59f6ad04f2e][5c5a0a5ed6c44][field_5c59f6ad0803b]: 4876
block[data][field_5c59f6ad04f2e][5c5a0a5ed6c44][field_5c59f745b0c76]: America's First Financial logo
block[data][field_5c59f6ad04f2e][5c5a0a5ed6c44][field_5c59f6ad08084]: #ffffff
block[name]: acf/logo-grid-block
block[align]:
block[mode]: preview
nonce: 057b20ab19
post_id: 4974
The topic ‘Repeater sub-field order not updating in Gutenberg’ is closed to new replies.
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.