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

feat: re-order rows with drag and drop and / or context menu #147

Open
Aarbel opened this issue Apr 23, 2024 · 4 comments
Open

feat: re-order rows with drag and drop and / or context menu #147

Aarbel opened this issue Apr 23, 2024 · 4 comments
Labels
good first issue Good for newcomers

Comments

@Aarbel
Copy link

Aarbel commented Apr 23, 2024

Hi Editor js team,

Thanks again for your amazing work. Do you know a way to reorder tables rows with drag and drop, or with context menu "move up / down - left / right ?

image image

Must have solution

image

Nice to have solution

Doing it with drag and drop, thanks to kommitters/editorjs-drag-drop#144

Thanks a lot !

@Aarbel
Copy link
Author

Aarbel commented May 2, 2024

Hi, following back about this last issue created.

Is there a way to implement drag and drop of rows / columns to re-adjust their order ?

Thanks a lot

@Aarbel
Copy link
Author

Aarbel commented May 2, 2024

@1GeekaN2 @neSpecc do you still maintain this lib ? do you need help to maintain it ?

@neSpecc
Copy link
Contributor

neSpecc commented May 2, 2024

@1GeekaN2 @neSpecc do you still maintain this lib ? do you need help to maintain it ?

Yes, but I'm currently focused on Editor core updating.

What about drag-and-drop or moving through the context menu? I believe it can be implemented. What is your priority?

@Aarbel Aarbel changed the title feat: re-order rows with drag and drop feat: re-order rows with drag and drop or context menu May 2, 2024
@Aarbel
Copy link
Author

Aarbel commented May 2, 2024

@1GeekaN2 @neSpecc do you still maintain this lib ? do you need help to maintain it ?

Yes, but I'm currently focused on Editor core updating.

What about drag-and-drop or moving through the context menu? I believe it can be implemented. What is your priority?

Thanks a lot @neSpecc for the quick answer. Priority would be thru the context menu (move row up, move row down, move column left, move column right), that's much more straightforward to implement.

image

Do you need help to implement it ? That should just be a very simple array switching in the state of the table

{
  "type" : "table",
  "data" : {
    "withHeadings": true,
    "content" : [ 
        [ "Kine", "Pigs", "Chicken" ], 
        [ "1 pcs", "3 pcs", "12 pcs" ], 
        [ "100$", "200$", "150$" ] ] // moving this row up 
  }
}

=>

{
  "type" : "table",
  "data" : {
    "withHeadings": true,
    "content" : [ 
        [ "Kine", "Pigs", "Chicken" ], 
        [ "100$", "200$", "150$" ] ],
        [ "1 pcs", "3 pcs", "12 pcs" ]
  }
}

@Aarbel Aarbel changed the title feat: re-order rows with drag and drop or context menu feat: re-order rows with drag and drop and / or context menu May 2, 2024
@e11sy e11sy added the good first issue Good for newcomers label Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants