API REFERENCE

GridRowRef

GridRowRef의 필드와 허용 값, 이 타입을 사용하는 API입니다.

타입 정의

물음표(?)는 선택 항목이고 readonly는 직접 변경하지 않는 값입니다. 유니온(|)은 허용된 형태 중 하나를 뜻합니다. 함수는 해당 시점에 Grid가 호출할 콜백입니다.

typescript
export interface GridRowRef<
  TData = GridData,
  TContext = unknown,
> extends GridLiveRef<TData> {
  readonly id: GridRowId;
  getSourceIndex(): number | null;
  getDisplayIndex(): number | null;
  getData(): Readonly<TData> | null;
  getParent(): GridRowRef<TData, TContext> | null;
  getChildren(): ReadonlyArray<GridRowRef<TData, TContext>>;
  isGroup(): boolean;
  isLeaf(): boolean;
  isMaster(): boolean;
  isDetail(): boolean;
  getLevel(): number;
  getRoute(): readonly string[];
  isSelected(): boolean;
  isExpanded(): boolean;
  setSelected(selected: boolean): Promise<boolean>;
  setExpanded(expanded: boolean): Promise<boolean>;
  setData(data: TData): Promise<boolean>;
  updateData(patch: Partial<TData>): Promise<boolean>;
  setValue<TField extends GridFieldPath<TData>>(
    field: TField,
    value: GridPathValue<TData, TField>,
  ): Promise<boolean>;
  setHeight(height: number | null): Promise<boolean>;
  focus(field?: GridFieldPath<TData>): Promise<boolean>;
  startEditing(field: GridFieldPath<TData>): Promise<boolean>;
}

이 타입을 사용하는 API

이 타입을 포함하는 계약