FileDrop
An experimental feature that lets users drop files on a Widget. The widget fires an event when a file is dropped onto it.
In the event, you get access to the raw files as strings, that were parsed by calling readAsBinaryString.
This feature is disabled by default. For info on enabling it, see GridFeatures.
NOTE: Currently only supports dropping one file at a time.
Configs
9
Configs
9Misc
bubbleEventsEvents
callOnFunctionsEvents
clientInstancePlugin
localeClassLocalizable
localizableLocalizable
localizablePropertiesLocalizable
Other
Properties
15
Properties
15Common
disabledInstancePlugin
Class hierarchy
Identifies an object as an instance of FileDrop class, or subclass thereof.
Identifies an object as an instance of FileDrop class, or subclass thereof.
isEventsEvents
isInstancePluginInstancePlugin
isLocalizableLocalizable
Other
Functions
28
Functions
28Configuration
Events
detachListenersBase
Misc
animatePropertyBase
callbackBase
doDisableInstancePlugin
downloadTestCaseBase
resolveCallbackBase
updateLocalizationLocalizable
Other
addListenerEvents
hasListenerEvents
onEvents
relayAllEvents
removeAllListenersEvents
removeListenerEvents
resumeEventsEvents
suspendEventsEvents
triggerEvents
unEvents
Events
6
Events
6Fired when a file is dropped on the widget element
// Adding a listener using the "on" method
fileDrop.on('fileDrop', ({ source, file, domEvent }) => {
});| Parameter | Type | Description |
|---|---|---|
source | Grid | The owning Grid instance |
file | DataTransferItem | The dropped file descriptor |
domEvent | DragEvent | The native DragEvent |
beforeDestroyEvents
catchAllEvents
destroyEvents
disableInstancePlugin
enableInstancePlugin
Event handlers
6
Event handlers
6Called when a file is dropped on the widget element
new FileDrop({
onFileDrop({ source, file, domEvent }) {
}
});| Parameter | Type | Description |
|---|---|---|
source | Grid | The owning Grid instance |
file | DataTransferItem | The dropped file descriptor |
domEvent | DragEvent | The native DragEvent |
onBeforeDestroyEvents
onCatchAllEvents
onDestroyEvents
onDisableInstancePlugin
onEnableInstancePlugin
Typedefs
1
Typedefs
1BryntumListenerConfigEvents