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

Support for multiple draggable component "slots" #550

Open
samiresua opened this issue Apr 5, 2024 · 2 comments
Open

Support for multiple draggable component "slots" #550

samiresua opened this issue Apr 5, 2024 · 2 comments

Comments

@samiresua
Copy link

samiresua commented Apr 5, 2024

Some custom components might have multiple composable parts that need to be rendered in different areas.

children is great for just one slot, but i wonder if supporting more than one child could be supported?

Could a new type be added into the variables for the component definition. Perhaps something like type: 'Component'?

I can also see being able to limit/validate what components are 'allowed' to be dropped into specific slots being super handy 👍

@elylucas
Copy link
Member

Hi @samiresua, thanks for the feedback.

We are currently looking into a way to do this, and maybe we could get some feedback from you on what we are thinking so far?

We are thinking of having a DropZone (or similarly named) component (imported from the sdk) that you can add to your own components that will allow you to define where things can be dropped. This DropZone will serve as the container for items to be dropped into, and you would be able to add your own styling/classes to it. Would something like that work for your needs?

@sami616
Copy link

sami616 commented Apr 11, 2024

This sounds great. Could it just render into a react fragment to avoid muddying the dom with another container? Are you planning any way to only allow certain components to be allowed into drop zones? For example. I might have an Accordion component that should only accept components that are AccordionItems.

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

3 participants