filestack / filestack-react

Official React component for Filestack - API and content management system that makes it easy to add powerful file uploading and transformation capabilities to any web or mobile application.
https://www.filestack.com
MIT License
164 stars 40 forks source link

Everytime you open the modal, another set of source options are appended #103

Closed sgtpenguin closed 3 years ago

sgtpenguin commented 3 years ago

To reproduce: Open the file picker, close it, then open it again. You can see every time a new set of source options (local,link,facebook,etc.) are appended to the bar on the left

Screen Shot 2020-11-12 at 10 29 48 AM
brunopopf commented 3 years ago

Same problem...

anixonCatalyst commented 3 years ago

I am running into the same issue, is there a workaround for this?

jakubpeksa commented 3 years ago

Can you provide codepen? I cannot reproduce that on demo

sgtpenguin commented 3 years ago

I can't reproduce it on the demo you provided either, but it's hard to play with it because it's minified and uses compiled code. When I try to make my own codepen I cannot successfully import the library. I get an error:

Uncaught Error: [Package Error] "punycode" does not exist. (Imported by "node:punycode").

@jakubpeksa Can you please provide a working codepen demo that imports the package from NPM and uses jsx syntax and I will try to reproduce the issue?

anixonCatalyst commented 3 years ago

@jakubpeksa I had the same issue when trying to get this working with react, but I can duplicate the issue using plain JS. The problem seems to be limited to calling open on the same instance of the picker multiple times.

example here

jakubpeksa commented 3 years ago

Regarding punycode error - I'll check it out tomorrow but I can't run it now also - that should be fixed with the newest 4.0.0 filestack-react version which will use the newest react, it'll be deployed within a month and I'll keep you updated about that. @anixonCatalyst Thanks for example! That looks like filestack-js core library problem which you can report here https://github.com/filestack/filestack-js/issues