ag-grid-react

  • Version 32.3.2
  • Published
  • 600 kB
  • 2 dependencies
  • MIT license

Install

npm i ag-grid-react
yarn add ag-grid-react
pnpm add ag-grid-react

Overview

AG Grid React Component

Index

Variables

variable CustomComponentContext

const CustomComponentContext: any;

    Functions

    function getInstance

    getInstance: <
    TGridComponent extends unknown = any,
    TCustomComponent extends TGridComponent = TGridComponent
    >(
    wrapperComponent: TGridComponent,
    callback: (customComponent: TCustomComponent | undefined) => void
    ) => void;
    • Function to retrieve the React component from an instance returned by the grid.

      Parameter wrapperComponent

      Instance component from the grid

      Parameter callback

      Callback which is provided the underlying React custom component

    function useGridCellEditor

    useGridCellEditor: (callbacks: CustomCellEditorCallbacks) => void;
    • Hook to allow custom cell editor component callbacks to be provided to the grid

    function useGridDate

    useGridDate: (callbacks: CustomDateCallbacks) => void;
    • Hook to allow custom date component callbacks to be provided to the grid

    function useGridFilter

    useGridFilter: (callbacks: CustomFilterCallbacks) => void;
    • Hook to allow custom filter component callbacks to be provided to the grid

    function useGridFloatingFilter

    useGridFloatingFilter: (callbacks: CustomFloatingFilterCallbacks) => void;
    • Hook to allow custom floating filter component callbacks to be provided to the grid

    function useGridMenuItem

    useGridMenuItem: (callbacks: CustomMenuItemCallbacks) => void;
    • Hook to allow custom menu item component callbacks to be provided to the grid

    function warnReactiveCustomComponents

    warnReactiveCustomComponents: () => void;

      Classes

      class AgGridReact

      class AgGridReact<TData = any> extends Component<
      AgGridReactProps<TData> | AgReactUiProps<TData>,
      object
      > {}

        property api

        api: GridApi<TData>;
        • Grid Api available after onGridReady event has fired.

        method componentWillUnmount

        componentWillUnmount: () => void;

          method registerApiListener

          registerApiListener: (listener: (api: GridApi) => void) => void;

            method render

            render: () => React.JSX.Element;

              Interfaces

              interface AgGridReactProps

              interface AgGridReactProps<TData = any> extends SharedProps<TData> {}

                property disableStaticMarkup

                disableStaticMarkup?: boolean;
                • Deprecated

                  v31.1 No longer used.

                property legacyComponentRendering

                legacyComponentRendering?: boolean;
                • Deprecated

                  v31.1 No longer used.

                interface AgReactComponent

                interface AgReactComponent {}

                  property getReactContainerClasses

                  getReactContainerClasses?: () => string[];
                  • Deprecated

                    v31.1 Apply styling directly to .ag-react-container if needed

                  property getReactContainerStyle

                  getReactContainerStyle?: () => object;
                  • Deprecated

                    v31.1 Apply styling directly to .ag-react-container if needed

                  interface AgReactUiProps

                  interface AgReactUiProps<TData = any> extends SharedProps<TData> {}
                  • Deprecated

                    v31.1 Use AgGridReactProps instead.

                  interface CustomCellEditorCallbacks

                  interface CustomCellEditorCallbacks extends BaseCellEditor {}
                  • Callbacks for custom cell editor components

                  interface CustomCellEditorProps

                  interface CustomCellEditorProps<TData = any, TValue = any, TContext = any>
                  extends ICellEditorParams<TData, TValue, TContext> {}
                  • Props provided to custom cell editor components

                  property initialValue

                  initialValue: TValue | null | undefined;
                  • The value in the cell when editing started.

                  property onValueChange

                  onValueChange: (value: TValue | null | undefined) => void;
                  • Callback that should be called every time the value in the editor changes.

                  property value

                  value: TValue | null | undefined;
                  • The current value for the editor.

                  interface CustomCellRendererProps

                  interface CustomCellRendererProps<TData = any, TValue = any, TContext = any>
                  extends ICellRendererParams<TData, TValue, TContext> {}
                  • Props provided to custom cell renderer components

                  interface CustomDateCallbacks

                  interface CustomDateCallbacks extends BaseDate {}
                  • Callbacks for custom date components

                  interface CustomDateProps

                  interface CustomDateProps<TData = any, TContext = any>
                  extends BaseDateParams<TData, TContext> {}
                  • Props provided to custom date components

                  property date

                  date: Date | null;
                  • The current date for the component.

                  property onDateChange

                  onDateChange: (date: Date | null) => void;
                  • Callback that should be called every time the date in the component changes.

                  interface CustomDetailCellRendererProps

                  interface CustomDetailCellRendererProps<TData = any, TDetail = any>
                  extends IDetailCellRendererParams<TData, TDetail> {}
                  • Props provided to custom detail cell renderer components

                  interface CustomDragAndDropImageProps

                  interface CustomDragAndDropImageProps<TData = any, TContext = any>
                  extends IDragAndDropImageParams<TData, TContext> {}

                    property icon

                    icon: string | null;
                    • The name of the icon provided by the grid about the current drop target.

                    property label

                    label: string;
                    • The label provided by the grid about the item being dragged.

                    property shake

                    shake: boolean;
                    • True if the grid is attempting to scroll horizontally while dragging.

                    interface CustomFilterCallbacks

                    interface CustomFilterCallbacks extends BaseFilter {}
                    • Callbacks for custom filter components

                    interface CustomFilterProps

                    interface CustomFilterProps<TData = any, TContext = any, TModel = any>
                    extends BaseFilterParams<TData, TContext> {}
                    • Props provided to custom filter components

                    property model

                    model: TModel | null;
                    • The current filter model for the component.

                    property onModelChange

                    onModelChange: (model: TModel | null) => void;
                    • Callback that should be called every time the model in the component changes.

                    property onUiChange

                    onUiChange: () => void;
                    • Callback that can be optionally called every time the filter UI changes. The grid will respond with emitting a FilterModifiedEvent. Apart from emitting the event, the grid takes no further action.

                    interface CustomFloatingFilterCallbacks

                    interface CustomFloatingFilterCallbacks extends BaseFloatingFilter {}
                    • Callbacks for custom floating filter components

                    interface CustomFloatingFilterProps

                    interface CustomFloatingFilterProps<
                    P = IFilter,
                    TData = any,
                    TContext = any,
                    TModel = any
                    > extends IFloatingFilterParams<P, TData, TContext> {}
                    • Props provided to custom floating filter components

                    property model

                    model: TModel | null;
                    • The current filter model for the component.

                    property onModelChange

                    onModelChange: (model: TModel | null) => void;
                    • Callback that should be called every time the model in the component changes.

                    interface CustomGroupCellRendererProps

                    interface CustomGroupCellRendererProps<TData = any, TValue = any>
                    extends IGroupCellRendererParams<TData, TValue> {}
                    • Props provided to custom group cell renderer components

                    interface CustomHeaderGroupProps

                    interface CustomHeaderGroupProps<TData = any, TContext = any>
                    extends IHeaderGroupParams<TData, TContext> {}
                    • Props provided to custom header group components

                    interface CustomHeaderProps

                    interface CustomHeaderProps<TData = any, TContext = any>
                    extends IHeaderParams<TData, TContext> {}
                    • Props provided to custom header components

                    interface CustomLoadingCellRendererProps

                    interface CustomLoadingCellRendererProps<TData = any, TContext = any>
                    extends ILoadingCellRendererParams<TData, TContext> {}
                    • Props provided to custom loading cell renderer components

                    interface CustomLoadingOverlayProps

                    interface CustomLoadingOverlayProps<TData = any, TContext = any>
                    extends ILoadingOverlayParams<TData, TContext> {}
                    • Props provided to custom loading overlay component

                    interface CustomMenuItemCallbacks

                    interface CustomMenuItemCallbacks extends BaseMenuItem {}
                    • Callbacks for custom menu item components

                    interface CustomMenuItemProps

                    interface CustomMenuItemProps<TData = any, TContext = any>
                    extends BaseMenuItemParams<TData, TContext> {}
                    • Props provided to custom menu item components

                    property active

                    active: boolean;
                    • The active status of the item (is it currently hovered with the mouse, or navigated to via the keyboard).

                    property expanded

                    expanded: boolean;
                    • If the item is a sub menu, whether it is currently opened or closed.

                    property onActiveChange

                    onActiveChange: (active: boolean) => void;
                    • Callback that should be called every time the active status is updated (if providing custom behaviour).

                    interface CustomNoRowsOverlayProps

                    interface CustomNoRowsOverlayProps<TData = any, TContext = any>
                    extends INoRowsOverlayParams<TData, TContext> {}
                    • Props provided to custom no-rows overlay component

                    interface CustomStatusPanelProps

                    interface CustomStatusPanelProps<TData = any, TContext = any>
                    extends IStatusPanelParams<TData, TContext> {}
                    • Props provided to custom status panel components

                    interface CustomToolPanelProps

                    interface CustomToolPanelProps<TData = any, TContext = any, TState = any>
                    extends BaseToolPanelParams<TData, TContext, TState> {}
                    • Props provided to custom tool panel components

                    property onStateChange

                    onStateChange: (model: TState | undefined) => void;
                    • If using grid state, callback that should be called every time the state in the component changes. If not using grid state, not required.

                    property state

                    state: TState | undefined;
                    • The current state for the component (used in grid state). Initially set to the same value as initialState

                    interface CustomTooltipProps

                    interface CustomTooltipProps<TData = any, TValue = any, TContext = any>
                    extends ITooltipParams<TData, TValue, TContext> {}
                    • Props provided to custom tooltip components

                    interface ICellEditorReactComp

                    interface ICellEditorReactComp extends ICellEditor, AgReactComponent {}
                    • Deprecated

                      v31.1 Use ICellEditor instead.

                    interface ICellRendererReactComp

                    interface ICellRendererReactComp extends ICellRenderer, AgReactComponent {}
                    • Deprecated

                      v31.1 Use ICellRenderer instead.

                    interface IDateReactComp

                    interface IDateReactComp extends IDate, AgReactComponent {}
                    • Deprecated

                      v31.1 Use IDate instead.

                    interface IFilterReactComp

                    interface IFilterReactComp extends IFilter, AgReactComponent {}
                    • Deprecated

                      v31.1 Use IFilter instead.

                    interface IFloatingFilterReactComp

                    interface IFloatingFilterReactComp extends IFloatingFilter, AgReactComponent {}
                    • Deprecated

                      v31.1 Use IFloatingFilter instead.

                    interface IHeaderGroupReactComp

                    interface IHeaderGroupReactComp extends IHeaderGroup, AgReactComponent {}
                    • Deprecated

                      v31.1 Use IHeaderGroup instead.

                    interface IHeaderReactComp

                    interface IHeaderReactComp extends IHeader, AgReactComponent {}
                    • Deprecated

                      v31.1 Use IHeader instead.

                    interface ILoadingCellRendererReactComp

                    interface ILoadingCellRendererReactComp extends AgReactComponent {}
                    • Deprecated

                      v31.1 No interface required.

                    interface ILoadingOverlayReactComp

                    interface ILoadingOverlayReactComp extends ILoadingOverlay, AgReactComponent {}
                    • Deprecated

                      v31.1 Use ILoadingOverlay instead.

                    interface INoRowsOverlayReactComp

                    interface INoRowsOverlayReactComp extends INoRowsOverlay, AgReactComponent {}
                    • Deprecated

                      v31.1 Use INoRowsOverlay instead.

                    interface IStatusPanelReactComp

                    interface IStatusPanelReactComp extends IStatusPanel, AgReactComponent {}
                    • Deprecated

                      v31.1 Use IStatusPanel instead.

                    interface IToolPanelReactComp

                    interface IToolPanelReactComp extends IToolPanel, AgReactComponent {}
                    • Deprecated

                      v31.1 Use IToolPanel instead.

                    interface ITooltipReactComp

                    interface ITooltipReactComp extends AgReactComponent {}
                    • Deprecated

                      v31.1 No interface required.

                    interface SharedProps

                    interface SharedProps<TData = any> extends GridOptions<TData> {}

                      property children

                      children?: any;

                        property className

                        className?: string;

                          property componentWrappingElement

                          componentWrappingElement?: string;

                            property containerStyle

                            containerStyle?: any;

                              property gridOptions

                              gridOptions?: GridOptions<TData>;

                                property maxComponentCreationTimeMs

                                maxComponentCreationTimeMs?: number;

                                  property modules

                                  modules?: Module[];
                                  • Used to register AG Grid Modules directly with this instance of the grid. See [Providing Modules To Individual Grids](https://www.ag-grid.com/react-data-grid/modules/#providing-modules-to-individual-grids) for more information.

                                  property setGridApi

                                  setGridApi?: (gridApi: GridApi<TData>) => void;

                                    Package Files (6)

                                    Dependencies (2)

                                    Dev Dependencies (8)

                                    Peer Dependencies (2)

                                    Badge

                                    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/ag-grid-react.

                                    • Markdown
                                      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/ag-grid-react)
                                    • HTML
                                      <a href="https://www.jsdocs.io/package/ag-grid-react"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>