Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

row block #5

Open
sil2 opened this issue Sep 20, 2023 · 2 comments
Open

row block #5

sil2 opened this issue Sep 20, 2023 · 2 comments

Comments

@sil2
Copy link

sil2 commented Sep 20, 2023

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
Copy link
Author

sil2 commented Sep 20, 2023

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
Copy link
Author

sil2 commented Sep 20, 2023

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.....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant