-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
draggable component does not get rerendered until clicked when not using inline function #854
Comments
I got this issue too. Sad reason is Redux
|
I think this is a bug. Related caution from the official docs: |
Fasinating! We have a test to ensure that parent renders are passed through: But the test is not exercising the case where a Droppable function is an instance property and not an inline function. This is worth investigating. We should be allowing all parent renders through |
Also, please confirm the issue is still occurring on the latest version. 7.x is two majors behind the current supported version |
Thanks! |
I'm getting it in |
Any thoughts on this @markerikson? |
Mmm... not specifically, other than |
@markerikson It looks like using an arrow function changes the At least, that is what I thought until I set |
So just to check: you're rendering |
Btw, I mispoke, I am using |
@markerikson here is what I am seeing:
this is the behaviour I want, but it is a little strange as I would think that each component's I am confused by this behaviour |
Hmm. That does sound odd. Do you have a CodeSandbox or other project that repros this issue? |
I can make one tomorrow
…On Sun, 28 Oct 2018 at 5:48 am, Mark Erikson ***@***.***> wrote:
Hmm. That does sound odd. Do you have a CodeSandbox or other project that
repros this issue?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#854 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACFN7eun8bNBac3_MOLyUbsRnoeGDySVks5upKppgaJpZM4XYdUf>
.
|
@alexreardon : Did you ever dig into this issue further? |
Just wanted to ping this issue again, as I ran into it today ("react-beautiful-dnd": "10.0.3") and spent some time confusedly debugging before finding this ticket. Relatively easy to work around it using an arrow function, but it's hard to track down & def could cause confusion for users. |
For sure, this looks like a deep react-redux issue. I am hoping it will just go away when we move to hooks #871 |
It could be worth calling out in the docs |
PR's welcome! |
FWIW, I don't think I ever did see any kind of a repro project or test that I could look at with this. |
I stopped digging after a while. I think I got distracted. My understanding: if you use a render props function then your children prop is always different, which has some flow-on effects. |
Can somebody check to see if this issue still exists on |
I'll close this for now as I have not heard any updates on it. Please feel free to comment on this and we can reopen it if it is still an issue for people |
Still an issue. I ran into this today and had to waste some time debugging this before I found this ticket. How about mentioning this in the "Common setup issues"? |
Still an issue on 13... |
Bug or feature request?
Bug
Similar to #156, however I'm not using MobX.
My state object is updated after move but the change is not represented in the view until I click on an element (i.e. after dropping the moved element, it appears that it has returned to its source location despite the state showing otherwise).
This only occurs when I'm not using an inline function.
Bad (Same result when using a non-arrow function):
Good:
What version of
React
are you using?16.4.7
What version of
react-beautiful-dnd
are you running?7.1.2
The text was updated successfully, but these errors were encountered: