Skip to content

Interface: AnyDropRowAction<C> ​

Defined in: ui/src/types.ts:70

A custom row action, or an override of a built-in one (same id).

Type Parameters ​

Type ParameterDefault type
C| AnyDropFileContext | AnyDropFolderContext

Properties ​

PropertyTypeDescriptionDefined in
icon?stringAn icon name (built-in or a key of icons) or SVG markup. Without one the label is the button text.ui/src/types.ts:76
idstringLower-case kebab-case; becomes data-ad-action. A built-in id overrides that action. toggle is reserved.ui/src/types.ts:72
label?string | ((ctx) => string)Accessible name and tooltip (text). Default for a built-in id: its dict* text.ui/src/types.ts:74

Methods ​

onClick()? ​

ts
onClick?(ctx, event): void;

Defined in: ui/src/types.ts:80

Runs on click and on the keyboard shortcut of an overridden built-in (event is the click or the KeyboardEvent). The actionclicked target is also a MockFile for rows made by displayExistingFile().

Parameters ​

ParameterType
ctxC
eventEvent

Returns ​

void


when()? ​

ts
when?(ctx): boolean;

Defined in: ui/src/types.ts:78

Shown when true (and, for a built-in id, when the built-in rule also holds).

Parameters ​

ParameterType
ctxC

Returns ​

boolean

Released under the MIT License.