VFilePicker
Props
Name | Type | Description |
---|---|---|
accept | string | List of accepted files types |
disabled | boolean | Sets the element's disabled state. A disabled element will not be included during form submission. |
error-text | string | Provides a custom error message. Any current error state will be overridden. |
file-too-big-error | string | Overrides the localized error message for file too big |
helper-text | string | Provides additional information to help the user enter the correct information. To add HTML to the helper text, use the helper-text slot instead. |
initial-value | string | The default value of the element. This value sets the value property only when the value property has not been explicitly set. |
invalid-file-type-error | string | Overrides the localized error message for invalid file type |
label | string | The label for the form element. |
max-file-size | number | The max file size that can be selected. |
max-files | number | The max files that can be selected. |
max-files-exceeded-error | string | Overrides the localized error message for max file exceed |
name | string | The name of the element. This element's value will be surfaced during form submission under the provided name. |
required | boolean | Require the field to be completed prior to form submission. |
single-file | boolean | Single file state. |
size | Enum:normal expanded | The size the file-uploader should have. |
value | string | The current value of the element. |
Events
Name | Event Type | Description |
---|---|---|
blur | FocusEvent | Fires when the element loses focus. |
change | CustomEvent<undefined> | Emitted when a file is added or removed. |
click | MouseEvent | Fires when a pointing device button (such as a mouse's primary mouse button) is both pressed and released while the pointer is located inside the element. |
focus | FocusEvent | Fires when the element receives focus. |
input | Event | Fires when the value of an element has been changed. |
keydown | KeyboardEvent | Fires when a key is pressed. |
keyup | KeyboardEvent | Fires when a key is released. |
Slots
Name | Description |
---|---|
helper-text | Describes how to use the file-picker. Alternative to the helper-text attribute. |
Methods
Name | Type | Description |
---|---|---|
acceptChanged | (_oldValue: string,newValue: string) => void | |
checkValidity | () => boolean | Return the current validity of the element. |
fileTooBigErrorChanged | (_oldValue: string,newValue: string) => void | |
formResetCallback | () => void | |
invalidFileTypeErrorChanged | (_oldValue: string,newValue: string) => void | |
maxFileSizeChanged | (_oldValue: number,newValue: number) => void | |
maxFilesChanged | (_oldValue: number,newValue: number) => void | |
maxFilesExceededErrorChanged | (_oldValue: string,newValue: string) => void | |
nameChanged | (previous: string,next: string) => unknown | |
removeAllFiles | () => unknown | Removes all files from the File Picker. |
reportValidity | () => boolean | Return the current validity of the element. If false, fires an invalid event at the element. |
singleFileChanged | () => unknown | |
validate | () => void | {@inheritDoc (FormAssociated:interface).validate} |