PickerInline && PickerDrop -- complain about missing container
See original GitHub issueWe have a Nextjs application and are conditionally importing this library using next/dynamic and then some adding some inline checks to make sure the window is present before rendering the component that contains filestack-react. When we use the PickerInline
or PickerDrop
components we get a rendering error that says it can’t find container #xyz whereas the PickerOverlay
works just fine. We’re gonna end up using the filestack-js
package until this is fixed and you expose an onClose()
event so we can manage our state.
I’ve attached a photo showing the issue.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:8
- Comments:6
Top Results From Across the Web
filestack - Bountysource
When we use the PickerInline or PickerDrop components we get a rendering error that says it can't find container #xyz whereas the PickerOverlay...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you @drewrwilson ! I create my own component to make
PickerInLine
works. Here’s how I do it, just in case anyone stumble upon the same issue:FilestackPicker.js
usage:
I hope it helps!
For anyone who is still facing this problem and doesn’t want to add their own picker, there is the option to simply define the container with an id in the picker options. Put a div around the picker element with the id defined in the options.
And now the most important thing to consider: Don’t use conditional rendering but add it via css in a ternary class. e.g. hidden if it should be hidden.
const options = { container: 'picker-container', }
<div id="picker-container" className={!open ? 'hidden' : 'block'}>
<PickerDropPane pickerOptions={options} />
</div>