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

demo: nested drop #2590

Merged
merged 1 commit into from
Jan 17, 2024
Merged

demo: nested drop #2590

merged 1 commit into from
Jan 17, 2024

Conversation

fredericrous
Copy link
Contributor

@fredericrous fredericrous commented Jan 2, 2024

Description

show how to add a subgrid with widgets inside either programmatically or by drag and drop. what do you think?

- add button to create a subgrid with widgets inside
- add a draggable subgrid with widgets inside
<a class="btn btn-primary" onClick="addNested()" href="#">Add Widget With Nested Content</a>
<div style="width: 100px;">
<div
class="gridstack-add-widget grid-stack-item ui-draggable"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isn't the right way (and event handler below) to drag a nested grid... but I will commit your change and modify afterward.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will wait for your solution then ^^ I know about the possibility of modifying the helper of setupDragIn, however I stumbled upon this issue #2231 and decided not to use it anymore (I don't remember what my path of thoughts was)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've commited my changes this morning to the demo... 'dropped' event is better suited, but you would need the custom attr if you have more than 1 item type to drag in (not case of demo).

@adumesny adumesny merged commit 03a056e into gridstack:master Jan 17, 2024
adumesny added a commit to adumesny/gridstack.js that referenced this pull request Jan 17, 2024
better fix for gridstack#2590 - more todo..
@adumesny adumesny mentioned this pull request Jan 17, 2024
adumesny added a commit to adumesny/gridstack.js that referenced this pull request Jan 17, 2024
adumesny added a commit to adumesny/gridstack.js that referenced this pull request Jan 17, 2024
@adumesny adumesny mentioned this pull request Jan 17, 2024
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

Successfully merging this pull request may close these issues.

None yet

2 participants