Skip to main content

useFilesField

Field hook to access the data of a configurable field with the type file with multiple files.

Arguments

The hook can take an object as argument with the following properties.

FieldTypeDescription
fieldstringThe name of the field

Returns

The File[] that the user entered.

Example

src/widgets/example/Example.tsx
import React from 'react'
import {useFilesField, ValueFile} from '@modbros/dashboard-sdk'

export default function Example() {
const files: ValueFile[] = useFilesField({field: 'example'})

return null
}