igniteui-react-grids
Version:
Ignite UI React grid components.
184 lines (178 loc) • 5.85 kB
TypeScript
import * as React from 'react';
import { RowDirective } from "./RowDirective";
import { ReactRenderer, PortalManager } from "igniteui-react-core";
import { ContentChildrenManager } from "igniteui-react-core";
export declare class IgrRowDirective<P extends IIgrRowDirectiveProps = IIgrRowDirectiveProps> extends React.Component<P & Omit<React.HTMLAttributes<HTMLElement>, keyof P>, {}> {
protected createImplementation(): RowDirective;
protected _implementation: any;
protected mounted: boolean;
get nativeElement(): HTMLElement;
/**
* @hidden
*/
get i(): RowDirective; /**
* @hidden
*/
static _createFromInternal(internal: any): IgrRowDirective;
protected _renderer: ReactRenderer;
protected _portalManager: PortalManager;
protected onImplementationCreated(): void;
protected _contentChildrenManager: ContentChildrenManager;
constructor(props: P & Omit<React.HTMLAttributes<HTMLElement>, keyof P>);
componentDidMount(): void;
shouldComponentUpdate(nextProps: any, nextState: any): boolean;
render(): React.DOMElement<{
ref: (ref: any) => void;
id: (P & Omit<React.HTMLAttributes<HTMLElement>, keyof P>)["id"];
class: (P & Omit<React.HTMLAttributes<HTMLElement>, keyof P>)["className"];
style: {};
children: any[];
}, any>;
protected _elRef: HTMLElement;
protected _getMainRef(ref: any): void;
/**
* The data passed to the row component.
* ```typescript
* // get the row data for the first selected row
* let selectedRowData = this.grid.selectedRows[0].data;
* ```
*/
get data(): any;
set data(v: any);
/**
* The index of the row.
* ```typescript
* // get the index of the second selected row
* let selectedRowIndex = this.grid.selectedRows[1].index;
* ```
*/
get index(): number;
set index(v: number);
/**
* Sets whether this specific row has disabled functionality for editing and row selection.
* Default value is `false`.
* ```typescript
* this.grid.selectedRows[0].pinned = true;
* ```
*/
get disabled(): boolean;
set disabled(v: boolean);
/**
* Sets whether the row is pinned.
* Default value is `false`.
* ```typescript
* this.grid.selectedRows[0].pinned = true;
* ```
*/
get pinned(): boolean;
set pinned(v: boolean);
/**
* Gets the expanded state of the row.
* ```typescript
* let isExpanded = row.expanded;
* ```
*/
get expanded(): boolean;
set expanded(v: boolean);
findByName(name: string): any;
protected __p: string;
protected _hasUserValues: Set<string>;
protected get hasUserValues(): Set<string>;
protected __m(propertyName: string): void;
protected _stylingContainer: any;
protected _stylingParent: any;
protected _inStyling: boolean;
protected _styling(container: any, component: any, parent?: any): void;
setNativeElement(element: any): void;
/**
* Updates the specified row object and the data source record with the passed value.
* ```typescript
* // update the second selected row's value
* let newValue = "Apple";
* this.grid.selectedRows[1].update(newValue);
* ```
*/
update(value: any): void;
/**
* Removes the specified row from the grid's data source.
* This method emits `rowDeleted` event.
* ```typescript
* // delete the third selected row from the grid
* this.grid.selectedRows[2].delete();
* ```
*/
del(): void;
isCellActive(visibleColumnIndex: any): void;
/**
* Pins the specified row.
* This method emits `rowPinning`\`rowPinned` event.
* ```typescript
* // pin the selected row from the grid
* this.grid.selectedRows[0].pin();
* ```
*/
pin(): void;
/**
* Unpins the specified row.
* This method emits `rowPinning`\`rowPinned` event.
* ```typescript
* // unpin the selected row from the grid
* this.grid.selectedRows[0].unpin();
* ```
*/
unpin(): void;
/**
* Spawns the add row UI for the specific row.
* @example
* ```typescript
* const row = this.grid1.getRowByIndex(1);
* row.beginAddRow();
* ```
*/
beginAddRow(): void;
}
export interface IIgrRowDirectiveProps {
children?: React.ReactNode;
id?: string | undefined;
className?: string | undefined;
style?: React.CSSProperties | undefined;
/**
* The data passed to the row component.
* ```typescript
* // get the row data for the first selected row
* let selectedRowData = this.grid.selectedRows[0].data;
* ```
*/
data?: any;
/**
* The index of the row.
* ```typescript
* // get the index of the second selected row
* let selectedRowIndex = this.grid.selectedRows[1].index;
* ```
*/
index?: number | string;
/**
* Sets whether this specific row has disabled functionality for editing and row selection.
* Default value is `false`.
* ```typescript
* this.grid.selectedRows[0].pinned = true;
* ```
*/
disabled?: boolean | string;
/**
* Sets whether the row is pinned.
* Default value is `false`.
* ```typescript
* this.grid.selectedRows[0].pinned = true;
* ```
*/
pinned?: boolean | string;
/**
* Gets the expanded state of the row.
* ```typescript
* let isExpanded = row.expanded;
* ```
*/
expanded?: boolean | string;
}