跳到主要内容

TCustomActionEvent

Payload of TFrameEvents.onCustomAction.

type TCustomActionEvent = object;

Example​

const events = {
onCustomAction: ({ action, type, items }: TCustomActionEvent) => {
if (action === "send" && type === "file") sendToCrm(items.map((file) => file.id));
},
};

Properties​

PropertyTypeDescription
actionstringKey of the clicked action.
folderIdnumber | stringId of the folder or room the user is in.
itemobjectThe item the context menu was opened for, in the form the data methods return it. Absent for create and for an action applied to a selection.
itemsobject[]Every selected item when the action was applied to a selection of items of one type, otherwise the single item. Absent for create.
type"file" | "folder" | "room" | "create"What the action was applied to: file, folder or room from a context menu, create from the create menu.