ag-grid-react

  • Version 33.3.2
  • Published
  • 620 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>, 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 GridOptions<TData> {}

                property children

                children?: any;
                • Deprecated

                  v33.3 AgGridReact does not accept children so this property will be removed.

                property className

                className?: string;
                • The CSS class to be applied to the grid's outermost div element.

                property componentWrappingElement

                componentWrappingElement?: string;
                • Default: div

                property containerStyle

                containerStyle?: any;
                • The CSS style to be applied to the grid's outermost div element.

                property gridOptions

                gridOptions?: GridOptions<TData>;

                  property maxComponentCreationTimeMs

                  maxComponentCreationTimeMs?: number;
                  • Deprecated

                    v33.3 It is expected that this property is no longer required and so will be removed in a future version. If you require this property please contact support.

                  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;
                  • Deprecated

                    v33.3 This method is not called and will be removed. To see how to access the GridApi visit: https://ag-grid.com/react-data-grid/grid-interface/#grid-api

                  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> {}
                  • Props provided to custom Drag and Drop Image components

                  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 CustomInnerHeaderGroupProps

                  interface CustomInnerHeaderGroupProps<TData = any, TContext = any>
                  extends IHeaderGroupParams<TData, TContext> {}

                    interface CustomInnerHeaderProps

                    interface CustomInnerHeaderProps<TData = any, TContext = any>
                    extends IHeaderParams<TData, TContext> {}

                      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 InternalAgGridReactProps

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

                        property passGridApi

                        passGridApi?: (gridApi: GridApi<TData>) => void;
                        • Internal method to pass api to top level class component.

                        Package Files (6)

                        Dependencies (2)

                        Dev Dependencies (12)

                        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>