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

I need specific behavior of 3 lists #794

Closed
andresdotsh opened this issue Sep 12, 2018 · 4 comments
Closed

I need specific behavior of 3 lists #794

andresdotsh opened this issue Sep 12, 2018 · 4 comments

Comments

@andresdotsh
Copy link

Bug or feature request?

Bug, I guess.

Expected behavior

Hi, I'm following the egghead tutorials and I'm trying to get the next behavior:
I have 3 lists, and I need to drag and drop items from the last list to any other list, and between the first 2 lists too, but not from the first 2 lists to the third one.
But not works, even as in the tutorial.

Actual behavior

I get this error: Trying to set droppable isEnabled to true but it is already true.

Steps to reproduce

I have this code repo and I do things like in this lesson.

What version of React are you using?

"react": "^16.5.0",
"react-dom": "^16.5.0",

What version of react-beautiful-dnd are you running?

"react-beautiful-dnd": "^9.0.2",

What browser are you using?

[email protected]

Demo

I have this base code https://github.com/drebits/beauty-dnd, and I need the behavior described above. Thanks any help.

@alexreardon
Copy link
Collaborator

Hi there! Thanks for raising this.

Can you please create a stand-alone example on codesandbox? Here is a boilerplate you can start from https://codesandbox.io/s/k260nyxq9v

@andresdotsh
Copy link
Author

Hi @alexreardon, thanks for your answer, here I have the example https://codesandbox.io/s/z2jlm9x243
I need the last list (droppable) be disabled when you try to drop from others lists. But when the dragging starts returns the error.

@alexreardon
Copy link
Collaborator

Okay, I know the issue: you are passing in isDragDisabled as null. This is an invalid value. It either needs to be a boolean or not provided (undefined) If you passed in undefined you would get our default value of false.

flow or typescript would have picked this up.

I am not sure if it is worth adding a runtime check for this given that it is an invalid value...

@alexreardon
Copy link
Collaborator

Passing in null is a violation of our types. I am not sure how far to go with run time checking. Please either pass in undefined or cast your value to a boolean Boolean(myValue)

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