Skip to content

Uploader: RHF 7 integration issue #11

@McManning

Description

@McManning

Uploader does not integrate well with RHF 7 - onBlur event doesn't trigger as expected.

Current workaround is to combine a controlled version with useState with RHF's setValue.

Something sort of like:

const [files, setFiles] = useState<UploadedFile[]>(...);
const { setValue } = useForm();

useEffect(() => {
  setValue(files);
}, [files]);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingv4.x

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions