new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Mantine · all subjects

hooks/usefiledialog

5 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

useFileDialog hook overview

The useFileDialog hook allows you to capture one or more files from the user without a file input element.

UseFileDialogOptions interface

UseFileDialogOptions is an interface with the following properties: multiple (boolean, optional, determines whether multiple files are allowed, default true), accept (string, optional, accept attribute of the file input, default '*'), capture (string, optional, capture attribute of the file input), directory (boolean, optional, determines whether the user can pick a directory instead of file, default false), resetOnOpen (boolean, optional, determines whether the file input state should be reset when the file dialog is opened, default false), initialFiles (FileList | File[], optional, initial selected files), onChange (function, optional, called when files are selected, receives FileList | null), onCancel (function, optional, called when file dialog is canceled).

UseFileDialogReturnValue interface

UseFileDialogReturnValue is an interface with the following properties: files (FileList | null), open (function with no parameters), reset (function with no parameters).

useFileDialog function signature

The useFileDialog function accepts an optional UseFileDialogOptions parameter and returns UseFileDialogReturnValue. Signature: function useFileDialog(input?: UseFileDialogOptions): UseFileDialogReturnValue;

Export types for useFileDialog

UseFileDialogOptions and UseFileDialogReturnValue types are exported from the @mantine/hooks package and can be imported in applications.

Give your agent this brain