pagebuilder-vue3 icon indicating copy to clipboard operation
pagebuilder-vue3 copied to clipboard

row block

Open sil2 opened this issue 1 year ago • 2 comments

Hi Isaac

Thank yo for this lib, it's absolutely amazing!

I just have 2 questions, please help me to figure it out:

  1. If I place 2 same blocks ob the page they are in conflict with each other. If I modify one, the second gets modified too. I think its because of clone() of the actually same block. Ive to save and re-load the page and only after that I can modify them. Is there a way to fix?
  2. I really need to be able to make something like a 'row block'. with 2 or 3 drag/drop sections. Maybe 2 'row' blocks - one with 2 columns and another one with 3 columns. And to be able to move blocks not into your 'block group' but in row columns. See what I mean? Any ideas how to make it?

Ill really appreciate your help man!

sil2 avatar Sep 20 '23 19:09 sil2

btw... I found the fix for my first question

clone method needs to be changed

`

    let clone = (block) => {

        let cloneMe = JSON.parse(JSON.stringify(block));

        cloneMe.uuid = uuidv4()
        return cloneMe
    }

`

sil2 avatar Sep 20 '23 20:09 sil2

the second issue will require a new layer like Row

and each row will be a separate Draggable object or a list of Draggable objects based on how many columns in row.

Ill have to implement CRUD for rows and also be able to move them up and down.....

sounds like a big task.....

sil2 avatar Sep 20 '23 20:09 sil2