Skip to content

Nested Gridfield: Ability to move item to another GridField #462

@wernerkrauss

Description

@wernerkrauss

Description

I have Page -> Group -> DataObject, with a manymany relation. Now I want to change the group the DO is in.
When saving the DO with changed GroupID, it gets reverted right after.

A general drag and drop solution would be great. Currently it seems, it's only implemented, if the DataObjects have Hierarchy extension applied.

My current project: SS5.4.21, gridfield-extensions 4.1.5

Additional context or points of discussion

In a discussion on slack, @forsdahl answered:

this behavior is not really due to nested gridfields, but to gridfield itself. The save functionality in gridfield always adds the record to the relation the curent gridfield is showing after doing a write, that's why you see it being reverted even though you change it in the form.
nested gridfield should have the ability to drag&drop an item into another gridfield though, for just this purpose
So if you expand the correct nodes, you can drag one item from one node into another
at least for Hierarchy objects, haven't tried it with other relation nesting though

If I should implement the feature myself I need some guidance.

Validations

  • You intend to implement the feature yourself
  • You have read the contributing guide
  • You strongly believe this feature should be in core, rather than being its own community module
  • You have checked for existing issues or pull requests related to this feature (and didn't find any)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions