OptionalbeforeAddRows
beforeAddRows?: ( ctx: { rows: TRow[]; source: "keyboard" | "api" },) => boolean | void
OptionalbeforeCellsDrag
beforeCellsDrag?: (ctx: { range: CellRange }) => boolean | void
OptionalbeforeCellsDrop
beforeCellsDrop?: ( ctx: { from: CellRange; mode: "move" | "copy"; to: CellRange; values: unknown[][]; },) => boolean| void
OptionalbeforeChartCreate
beforeChartCreate?: ( ctx: { data: ChartData; source: "selection" | "visible" | "all" | "columns"; type: ChartType; },) => boolean| void
OptionalbeforeCollapse
beforeCollapse?: ( ctx: { keys: RowKey[] | "all"; kind: "group" | "tree"; source: "api" | "user"; },) => boolean| void
OptionalbeforeColumnChange
beforeColumnChange?: (
ctx: {
columnId: string;
type:
| "hide"
| "move"
| "add"
| "remove"
| "show"
| "pin"
| "unpin"
| "resize"
| "update";
},
) => boolean
| void
beforeContextMenu?: ( ctx: { columnId: string | null; event: MouseEvent | null; rowKey: RowKey | null; zone: ContextMenuZone; },) => boolean| void
OptionalbeforeCopy
beforeCopy?: (
ctx: { columns: string[]; headers: boolean; rows: number },
) => boolean | void
OptionalbeforeCut
beforeCut?: (
ctx: { columns: string[]; headers: boolean; rows: number },
) => boolean | void
OptionalbeforeEdit
beforeEdit?: ( ctx: { columnId: string; rowKey: RowKey; trigger: CellEditTrigger; value: unknown; },) => boolean| void
OptionalbeforeExpand
beforeExpand?: ( ctx: { keys: RowKey[] | "all"; kind: "group" | "tree"; source: "api" | "user"; },) => boolean| void
OptionalbeforeFileImport
beforeFileImport?: (ctx: { file: File }) => boolean | void
OptionalbeforeFill
beforeFill?: ( ctx: { direction: "x" | "y"; sourceRange: CellRange; targetRange: CellRange; },) => boolean| void
OptionalbeforeFilter
beforeFilter?: ( ctx: { model: FilterModel; source: "api" | "user"; tree?: FilterNode },) => boolean | void
OptionalbeforeFilterPresetApply
beforeFilterPresetApply?: ( ctx: { preset: FilterPreset; source: "api" | "user" },) => boolean | void
OptionalbeforeGroup
beforeGroup?: (
ctx: {
columns: string[];
op: "move" | "set" | "add" | "remove";
source: "api" | "user";
},
) => boolean
| void
OptionalbeforeGroupRowEdit
beforeGroupRowEdit?: (
ctx: {
columnId: string;
groupKey: string;
keys: (string | number)[];
value: unknown;
},
) => boolean
| void
beforeHeaderGroupToggle?: ( ctx: { collapsed: boolean; groupId: string; source: ColumnChangeSource },) => boolean | void
OptionalbeforeMoveRows
beforeMoveRows?: ( ctx: { keys: RowKey[]; kind: "move" | "indent" | "outdent"; target: MoveTarget; },) => boolean| void
OptionalbeforeOrderIndexChange
beforeOrderIndexChange?: ( ctx: { changes: { from: number | null; rowKey: RowKey; to: number }[]; field: string; renumbered: boolean; source: "api" | "move"; },) => boolean| void
OptionalbeforePageChange
beforePageChange?: (
ctx: {
from: number;
pageSize: number;
source: "api" | "user";
to: number;
},
) => boolean
| void
OptionalbeforePaste
beforePaste?: (ctx: { text: string }) => string | boolean | void
OptionalbeforeRedo
beforeRedo?: () => boolean | void
OptionalbeforeRemoveRows
beforeRemoveRows?: ( ctx: { keys: RowKey[]; mode?: "hide" | "delete" | "mark"; source: "keyboard" | "api"; },) => boolean| void
OptionalbeforeRowPanelClose
beforeRowPanelClose?: ( ctx: { dirty: boolean; reason: "api" | "cancel" | "switch"; rowKey: RowKey; },) => boolean| void
OptionalbeforeRowPanelOpen
beforeRowPanelOpen?: ( ctx: { previousKey: RowKey | null; rowKey: RowKey },) => boolean | void
OptionalbeforeRowPanelSave
OptionalbeforeSort
beforeSort?: ( ctx: { model: SortItem[]; source: "api" | "user" },) => boolean | void
OptionalbeforeTreeChildrenLoad
beforeTreeChildrenLoad?: ( ctx: { page: number; parentKey: RowKey },) => boolean | void
OptionalbeforeUndo
beforeUndo?: () => boolean | void
OptionalcanSelect
canSelect?: ( ctx: { columnId: string | null; kind: "cell" | "row"; rowKey: RowKey },) => boolean
OptionalcopyCell
copyCell?: ( ctx: { columnId: string; rowKey: RowKey; text: string; value: unknown },) => string | void
copyHeader?: (ctx: { columnId: string; text: string }) => string | void
OptionalentryFocus
entryFocus?: ( ctx: { direction: "api" | "click" | "next" | "prev" },) => string | void | { columnId: string; rowKey: RowKey } | null
OptionalnextCell
nextCell?: ( ctx: { direction: "next" | "prev" | "up" | "down" | "left" | "right"; event: KeyboardEvent; from: { columnId: string; rowKey: RowKey } | null; },) => void| { columnId: string; rowKey: RowKey }| null
nextHeader?: (
ctx: {
direction: "next" | "prev";
event: KeyboardEvent;
from: string | null;
},
) => string
| void
| null
OptionalonKeyDown
onKeyDown?: ( ctx: { columnId: string | null; editing: boolean; event: KeyboardEvent; rowKey: RowKey | null; },) => boolean| void
OptionalpasteCell
pasteCell?: ( ctx: { columnId: string; rowKey: RowKey; text: string },) => string | void
popupCreated?: (
ctx: {
element: HTMLElement;
kind:
| "filter"
| "column-menu"
| "cell-menu"
| "picker"
| "tooltip"
| "editor";
},
) => void
OptionalrowRendered
rowRendered?: ( ctx: { element: HTMLElement; index: number; rowKey: RowKey },) => void
OptionaltabOut
tabOut?: (
ctx: { direction: "next" | "prev"; event: KeyboardEvent },
) => boolean | void
transformEdit?: ( ctx: { columnId: string; oldValue: unknown; rowKey: RowKey; value: unknown; },) => unknown
GridOptions.hooks: 취소 가능한 훅. 예외는 허용으로 보고error이벤트(callback-error)로 알린다.