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 Parameter | Default type |
|---|---|
C | | AnyDropFileContext | AnyDropFolderContext |
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
icon? | string | An 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 |
id | string | Lower-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
| Parameter | Type |
|---|---|
ctx | C |
event | Event |
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
| Parameter | Type |
|---|---|
ctx | C |
Returns
boolean