v7.3.0

FileDrop
Feature
Experimental

An experimental feature that lets users drop files on a Widget. The widget fires a fileDrop 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.

const grid = new Grid({
    features : {
        fileDrop : true
    },
    listeners : {
        fileDrop({ file, domEvent }) {
            console.log('Dropped file:', file.name);
        }
    }
});

See also

  • Grid - The grid component
No results

Properties

Properties are getters/setters or publicly accessible variables on this class
  • isFileDrop : Booleantrue
    READONLY
    static
    ADVANCED
    Identifies an object as an instance of FileDrop class, or subclass thereof.

Events

Events are triggered for certain actions in this class and can be listened for to react to those actions in your code

Event handlers

Event handlers are callbacks called as a result of certain actions in this class
id: fileDrop

Source path

Grid/feature/experimental/FileDrop.js

Contents