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

customRender is broken on the current version #89

Closed natenrb9 closed 4 years ago

natenrb9 commented 4 years ago

Works perfectly:

<ReactFilestack
     apikey={API_KEY}
     actionOptions={OPTIONS}
     onSuccess={result => uploadSuccess(result, parentGroupId, groupId, selectedLibraryItemId)}
/>

Does not work, returns undefined in the console log, looks like it has something to do with if (console.log(this.cropFiles))... What would cropFiles have to do with when just trying to load the picker?? Is there some bug in my customRender code I am not seeing?? I have tried all sorts of things and nothing works. Note: I just updated to 3.0+, and it was working perfectly before.

<ReactFilestack
     apikey={API_KEY}
     actionOptions={OPTIONS}
     customRender={({ onPick }) => (
          <Button className={buttonClass} onClick={onPick}>
               {buttonText}
          </Button>
     )}
onSuccess={result => uploadSuccess(result, parentGroupId, groupId, selectedLibraryItemId)}
 />
natenrb9 commented 4 years ago

Figured this out, it was due to a conflict with being in a Material-UI Menu...