-
Notifications
You must be signed in to change notification settings - Fork 54
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
List doesn't get rendered when items are loaded async and select component is hidden #143
Comments
hey, |
Hi @SEUH, we have merged the solution, it is included into v1.1.1 release. |
@stepovat This doesn't seem to be fixed. Have a look at the updated reproduction setup (now with v1.1.1) https://codesandbox.io/s/r5q843yjq |
@SEUH Could you please tell if it reproduces for you not in the scope of codesandbox? |
Sorry for the late response. It still fails in my local setup |
@SEUH Sorry, but this problem is not react-multi-select. If you use https://react-bootstrap.github.io/components/tabs/#tab-props. You need mountOnEnter = {true} in the second tab. Сould you please recheck and give feedback for us if it works for you, thanks! |
@MaksimDrobchak The problem is with react-multi-select. I adjusted the reproduction setup (removed bootstrap) to make it clearer https://codesandbox.io/s/affectionate-worker-6wt8r This should be self-explanatory: The component is rendered & mounted but with "display: none" the component is not visible and has no height in the dom. If you take a closer look not only the items are not rendered but also the container for the items. And "mountOnEnter" should also be self-explanatory. This only means that the component is only mounted when tab enter and thus not hidden, which means that the error does not occur. A picture for illustration (took from reproduction setup output code): |
Still not working with v1.1.5. Is there any update on this? |
same by me here any update? |
Hi, I'm sorry it took us time to reply. We are currently a bit short on maintenance capacity for the component internally. Therefore, I encourage you or anyone else to contribute fixes to the component. |
I load the items for the multi select component asynchonously and the component is hidden at render time.
Expected Behavior
Items render normally
Actual Behavior
Items don't render
Steps to Reproduce the Problem
Just set the items variable asynchonously and set display none of component
Here's a reproduction setup (i use bootstrap tab for simplicity, but it should be equivalent to the setup i described): https://codesandbox.io/s/94nlm5mjrr
Specifications
My guess is that at render time, due that the component is not visible, it has no actual height. And because this package uses "react-height" i think that might be the problem.
The text was updated successfully, but these errors were encountered: