unmounted method of my custom source should be called when I close file picker
Current Behavior
unmounted method of my custom source is not called
Steps to Reproduce (for bugs)
Create a simple custom source like
const myNewCustomSource = {
label: 'My new Custom Source',
name: 'myCustomSource',
icon: '<div />', // irrelevant for this example
mounted: (element, actions) => {
console.log("mounted")
},
unmounted: (element) => {
console.log("unmounted")
}
}
Import and push your custom source to fromSources array in filestack's options
Open the file picker
Select your new custom source
Check console - your new source has been mounted
Close file picker
Check console - you won't see any info that it was unmounted
Context
I am trying to include custom source for filestack in a React app. I should be able to remove my components from the DOM when the user is done with picking the files from my custom source.
Your Environment
Version used: 3.25.0
Browser Name and version: Chrome
Operating System and version (desktop or mobile): macOS 11.6.2
Expected Behavior
unmounted
method of my custom source should be called when I close file pickerCurrent Behavior
unmounted
method of my custom source is not calledSteps to Reproduce (for bugs)
fromSources
array in filestack's optionsContext
I am trying to include custom source for filestack in a React app. I should be able to remove my components from the DOM when the user is done with picking the files from my custom source.
Your Environment