area17 / twill

Twill is an open source CMS toolkit for Laravel that helps developers rapidly create a custom admin console that is intuitive, powerful and flexible. Chat with us on Discord at https://discord.gg/cnWk7EFv8R.
https://twillcms.com
Apache License 2.0
3.72k stars 568 forks source link

Repeaters have wrong field values inside a cloned block #2044

Closed ianinadavydova closed 7 months ago

ianinadavydova commented 1 year ago

Description

When repeater is inside a block editor, and we clone this block, repeater's data is wrong, fields values are the same within several repeaters. Maybe it is connected with https://github.com/area17/twill/issues/1818, but in that issue repeater's fields are empty and in my case I have them filled with wrong data

Steps to reproduce

  1. Define a block editor with repeater block.
  2. Add several repeater items & fill it's form fields.
  3. Duplicate the field.

Also possible to watch the video to understand: Download example video.

Expected result

Repeaters fields values in cloned block are exactly the same as in the initial block

Actual result

Cloned repeaters fields data is wrong, it has the same values within several items instead of all different data in each of them, exactly like in the initial block photo1663749667

Versions

Twill version: 2.8.7 Laravel version: 8.0 PHP version: 7.4 Database engine: Mysql: 5.7

haringsrob commented 1 year ago

hey @ianinadavydova is this a json repeater?

ianinadavydova commented 1 year ago

@haringsrob Hey, it is this repeater https://twill.io/docs/1.x/#adding-repeater-blocks

ifox commented 1 year ago

Related to #1818