You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-3Lines changed: 19 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,8 +74,25 @@ dropfile comes with both a component and an action. The component is basically a
74
74
|`multiple`| sets the file input to `multiple`. See [HTML attribute: multiple on MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/multiple) for more information. |`boolean`|`true`|
75
75
|`disabled`| disables the action/component, removing all event listeners |`boolean`|`false`|
76
76
|`windowDrop`| determines whether or not files can be dropped anywhere in the window. A value of `false` would require that the files be droppped within the `<FileDrop>` component or the element with `use:filedrop`. |`boolean`|`true`|
77
-
|`clickToUpload`| causes the containing element to be treated as the input. Disabling this does not change the `tabindex` of the container or remove the `keydown` eventListener |`boolean`|`true`|
78
-
|`input`| allows you to explicitly pass the file `HTMLInputElement` as a parameter. If this `undefined`, the action will search for `input[type="file"]`. If one is not found, it will be appeneded to the element with `use:filedrop`|`HTMLInputElement`|`undefined`|
77
+
|`clickToUpload`| causes the containing element to be treated as the input. If hideInput is true or undefined, disabling this does not change the `tabindex` of the container or remove the `keydown` eventListener |`boolean`|`true`|
78
+
|`tabIndex`| tab index of the container. if `disabled` is `true` then this is set to `-1`. If `clickToUpload` is `true` or `undefined`, this defaults to 0. |`number`|`0`|
79
+
|`hideInput`| if true or undefined, input[type='file'] will be set to display:none|`boolean`|`true`|
80
+
|`input`| allows you to explicitly pass a reference to the file `HTMLInputElement` as a parameter. If `undefined`, the action will search for `input[type="file"]`. If one is not found, it will be appeneded to the element with `use:filedrop`|`HTMLInputElement`|`undefined`|
| filedrop | one or more files has been selected in the file dialog or drag-and-dropped |`FileDropSelectEvent`|
87
+
| filedragenter | a dragenter event has occurred on the container element containnig one or more files |`FileDropDragEvent`|
88
+
| filedragleave | a dragleave event has occurred on the container element containing one or more files |`FileDropDragEvent`|
89
+
| filedragover | a dragover event has occurred on the container element containing one or more files |`FileDropDragEvent`|
90
+
| filedialogcancel | the file dialog has been canceled without selecting files |`FileDropEvent`|
91
+
| filedialogclose | the file dialog has been closed with files selected |`FileDropEvent`|
92
+
| filedialogopen | the file dialog has been opened |`FileDropEvent`|
93
+
| windowfiledragenter | a dragenter event has occurred on the document (event is named windowfiledragenter so not to confuse document with file) |`FileDropDragEvent`|
94
+
| windowfiledragleave | a dragleave event has occurred on the document (event is named windowfiledragleave so not to confuse document with file) |`FileDropDragEvent`|
95
+
| windowfiledragover | a dragover event has occurred on the document (event is named windowfiledragover so not to confuse document with file) |`FileDropDragEvent`|
79
96
80
97
### Errors
81
98
@@ -99,7 +116,6 @@ dropfile comes with both a component and an action. The component is basically a
0 commit comments