Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Unable to identify drag source on drop/added events #3057

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

Closed
gopinathbecse opened this issue May 25, 2025 · 2 comments
Closed

Unable to identify drag source on drop/added events #3057

gopinathbecse opened this issue May 25, 2025 · 2 comments

Comments

@gopinathbecse
Copy link

I am trying to implement a dashboard page with different types of widgets. Will show a tool box on side bar. User can drag small tool icons from side bar into the GridStack container. After drop the I should render the corresponding component based on the widget dropped. Each widget is a separate component.

I tried to use ngFor sample to render the widgets list. In that case, to add new items to the list, I need to know the widget type dropped from tool box. But dropped event/added event doesn't provide the original tool box element which has data- attributes to identify widget type.

If your suggestion is to avoid using "acceptWidgets" in this scenario and add drop event listeners for manual handling, I am losing the UI behaviours of GridStack.

Any suggestions will be appreciated.

@adumesny
Copy link
Member

GridStack.setupDragIn() support a list of GridStackWidget[] to create on drop - see examples. next time use slack for questions

@gopinathbecse
Copy link
Author

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

No branches or pull requests

2 participants