-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
79 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
import {EventEmitter} from "events"; | ||
import { EventEmitter } from 'events'; | ||
|
||
/** | ||
* The core API interface that is available in the grid [[apiRef]]. | ||
*/ | ||
export interface CoreApi extends EventEmitter { | ||
/** | ||
* Property that comes true when the grid has its EventEmitter initialised. | ||
*/ | ||
isInitialised: boolean; | ||
/** | ||
* Allows to register a handler for an event. | ||
* | ||
* @param event | ||
* @param handler | ||
*/ | ||
registerEvent: (event: string, handler: (param: any) => void) => () => void; | ||
/** | ||
* Property that comes true when the grid has its EventEmitter initialised. | ||
*/ | ||
isInitialised: boolean; | ||
/** | ||
* Allows to register a handler for an event. | ||
* | ||
* @param event | ||
* @param handler | ||
*/ | ||
registerEvent: (event: string, handler: (param: any) => void) => () => void; | ||
|
||
/** | ||
* Allows to emit an event. | ||
* | ||
* @param name | ||
* @param args | ||
*/ | ||
emitEvent: (name: string, ...args: any[])=> void; | ||
} | ||
/** | ||
* Allows to emit an event. | ||
* | ||
* @param name | ||
* @param args | ||
*/ | ||
emitEvent: (name: string, ...args: any[]) => void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
import * as React from "react"; | ||
import * as React from 'react'; | ||
|
||
/** | ||
* The events API interface that is available in the grid [[apiRef]]. | ||
*/ | ||
export interface EventsApi { | ||
/** | ||
* The react ref of the grid root container div element. | ||
*/ | ||
rootElementRef?: React.RefObject<HTMLDivElement>; | ||
/** | ||
* Add a handler that will be triggered when the component unmount. | ||
* | ||
* @param handler | ||
*/ | ||
onUnmount: (handler: (param: any) => void) => void; | ||
/** | ||
* Add a handler that will be triggered when the component resize. | ||
* | ||
* @param handler | ||
*/ | ||
onResize: (handler: (param: any) => void) => void; | ||
/** | ||
* Trigger a resize of the component, and recalculation of width and height. | ||
* | ||
* @param handler | ||
*/ | ||
resize: () => void; | ||
} | ||
/** | ||
* The react ref of the grid root container div element. | ||
*/ | ||
rootElementRef?: React.RefObject<HTMLDivElement>; | ||
/** | ||
* Add a handler that will be triggered when the component unmount. | ||
* | ||
* @param handler | ||
*/ | ||
onUnmount: (handler: (param: any) => void) => void; | ||
/** | ||
* Add a handler that will be triggered when the component resize. | ||
* | ||
* @param handler | ||
*/ | ||
onResize: (handler: (param: any) => void) => void; | ||
/** | ||
* Trigger a resize of the component, and recalculation of width and height. | ||
* | ||
* @param handler | ||
*/ | ||
resize: () => void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
import {RowApi} from './rowApi'; | ||
import {ColumnApi} from './columnApi'; | ||
import {SelectionApi} from './selectionApi'; | ||
import {SortApi} from './sortApi'; | ||
import {PaginationApi} from './paginationApi'; | ||
import {VirtualizationApi} from './virtualizationApi'; | ||
import {CoreApi} from "./coreApi"; | ||
import {EventsApi} from "./eventsApi"; | ||
import { RowApi } from './rowApi'; | ||
import { ColumnApi } from './columnApi'; | ||
import { SelectionApi } from './selectionApi'; | ||
import { SortApi } from './sortApi'; | ||
import { PaginationApi } from './paginationApi'; | ||
import { VirtualizationApi } from './virtualizationApi'; | ||
import { CoreApi } from './coreApi'; | ||
import { EventsApi } from './eventsApi'; | ||
|
||
/** | ||
* The full Grid API. | ||
*/ | ||
export type GridApi = RowApi & | ||
export type GridApi = CoreApi & | ||
EventsApi & | ||
RowApi & | ||
ColumnApi & | ||
SelectionApi & | ||
SortApi & | ||
VirtualizationApi & | ||
CoreApi & | ||
EventsApi & | ||
PaginationApi; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters