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

Common

disabledInstancePlugin
listenersEvents

Misc

clientInstancePlugin
localeClassLocalizable
localizableLocalizable

Other

Properties

15

Common

disabledInstancePlugin

Class hierarchy

isFileDrop: Boolean= truereadonly
Identifies an object as an instance of FileDrop class, or subclass thereof.
isFileDrop: Boolean= truereadonlystatic
Identifies an object as an instance of FileDrop class, or subclass thereof.
isEventsEvents
isInstancePluginInstancePlugin
isLocalizableLocalizable

Lifecycle

configBase

Misc

clientInstancePlugin
localeHelperLocalizable
localeManagerLocalizable

Other

Functions

28

Configuration

applyDefaultsstaticBase

Events

Lifecycle

destroystaticBase

Misc

doDisableInstancePlugin
initClassstaticBase
isOfTypeNamestaticBase
mixinstaticBase
optionalLstaticLocalizable

Other

LstaticLocalizable
onEvents
relayAllEvents
triggerEvents
unEvents

Events

6

Fired when a file is dropped on the widget element

// Adding a listener using the "on" method
fileDrop.on('fileDrop', ({ source, file, domEvent }) => {

});
ParameterTypeDescription
sourceGrid

The owning Grid instance

fileDataTransferItem

The dropped file descriptor

domEventDragEvent

The native DragEvent

catchAllEvents
destroyEvents
disableInstancePlugin
enableInstancePlugin

Event handlers

6

Called when a file is dropped on the widget element

new FileDrop({
    onFileDrop({ source, file, domEvent }) {

    }
});
ParameterTypeDescription
sourceGrid

The owning Grid instance

fileDataTransferItem

The dropped file descriptor

domEventDragEvent

The native DragEvent

onDestroyEvents
onDisableInstancePlugin
onEnableInstancePlugin

Typedefs

1