Skip to content

Releases: Jaaneek/useFilePicker

v2.1.2

25 Apr 18:08
214505b
Compare
Choose a tag to compare
  • Wrapped openFilePicker in useCallback #87

useFilePicker hook will now return the same function if you memoize the hook props:

const ufpProps = useMemo(() => ({ accept: "*", multiple: true }). []);
const { openFilePicker } = useFilePicker(ufpProps);
// openFilePicker is always gonna stay the same so you can pass it as a dependency to other hooks

v2.1.1

27 Oct 11:12
0441659
Compare
Choose a tag to compare
  • Fixed issue with clearing the filesContent list in useImperativeFilePicker #82
  • Added FileTypeValidator #76 #49

v2.1.0

25 Sep 23:03
7b0562d
Compare
Choose a tag to compare

Changelog:

  • Fixed #79. useImperativeFilePicker now accepts a new callback as a prop: onFileRemoved. You can read more about this here