rc-table

  • Version 7.47.0
  • Published
  • 400 kB
  • 6 dependencies
  • MIT license

Install

npm i rc-table
yarn add rc-table
pnpm add rc-table

Overview

table ui component for react

Index

Variables

variable _default

const _default: ImmutableTableType;

    variable EXPAND_COLUMN

    const EXPAND_COLUMN: {};

      variable INTERNAL_COL_DEFINE

      const INTERNAL_COL_DEFINE: string;

        variable INTERNAL_HOOKS

        const INTERNAL_HOOKS: string;

          variable Summary

          const Summary: typeof Summary;

            variable VirtualTable

            const VirtualTable: ForwardGenericVirtualTable;

              Functions

              function Column

              Column: <RecordType>(_: ColumnProps<RecordType>) => any;
              • This is a syntactic sugar for columns prop. So HOC will not work on this.

              function ColumnGroup

              ColumnGroup: <RecordType>(_: ColumnGroupProps<RecordType>) => any;
              • This is a syntactic sugar for columns prop. So HOC will not work on this.

              function genTable

              genTable: (
              shouldTriggerRender?: CompareProps<
              <RecordType extends DefaultRecordType>(
              tableProps: TableProps<RecordType>,
              ref: React.Ref<Reference>
              ) => React.JSX.Element
              >
              ) => ForwardGenericTable;

                function genVirtualTable

                genVirtualTable: (
                shouldTriggerRender?: CompareProps<ImmutableTableType>
                ) => ForwardGenericVirtualTable;

                  Interfaces

                  interface ColumnType

                  interface ColumnType<RecordType> extends ColumnSharedType<RecordType> {}

                    property colSpan

                    colSpan?: number;

                      property dataIndex

                      dataIndex?: DataIndex<RecordType>;

                        property minWidth

                        minWidth?: number;

                          property onCell

                          onCell?: GetComponentProps<RecordType>;

                            property onCellClick

                            onCellClick?: (record: RecordType, e: React.MouseEvent<HTMLElement>) => void;
                            • Deprecated

                              Please use onCell instead

                            property render

                            render?: (
                            value: any,
                            record: RecordType,
                            index: number
                            ) => React.ReactNode | RenderedCell<RecordType>;

                              property rowSpan

                              rowSpan?: number;

                                property shouldCellUpdate

                                shouldCellUpdate?: (record: RecordType, prevRecord: RecordType) => boolean;

                                  property width

                                  width?: number | string;

                                    interface TableProps

                                    interface TableProps<RecordType = any>
                                    extends Omit<LegacyExpandableProps<RecordType>, 'showExpandColumn'> {}

                                      property caption

                                      caption?: React.ReactNode;

                                        property children

                                        children?: React.ReactNode;

                                          property className

                                          className?: string;

                                            property columns

                                            columns?: ColumnsType<RecordType>;

                                              property components

                                              components?: TableComponents<RecordType>;

                                                property data

                                                data?: readonly RecordType[];

                                                  property direction

                                                  direction?: Direction;

                                                    property emptyText

                                                    emptyText?: React.ReactNode | (() => React.ReactNode);

                                                      property expandable

                                                      expandable?: ExpandableConfig<RecordType>;
                                                      • Config expand rows

                                                      property footer

                                                      footer?: PanelRender<RecordType>;

                                                        property getContainerWidth

                                                        getContainerWidth?: (ele: HTMLElement, width: number) => number;
                                                        • Internal usage, may remove by refactor.

                                                          !!! DO NOT USE IN PRODUCTION ENVIRONMENT !!!

                                                        property id

                                                        id?: string;

                                                          property indentSize

                                                          indentSize?: number;

                                                            property internalHooks

                                                            internalHooks?: string;
                                                            • Internal usage, may remove by refactor. Should always use columns instead.

                                                              !!! DO NOT USE IN PRODUCTION ENVIRONMENT !!!

                                                            property internalRefs

                                                            internalRefs?: {
                                                            body: React.MutableRefObject<HTMLDivElement>;
                                                            };
                                                            • Internal usage, may remove by refactor.

                                                              !!! DO NOT USE IN PRODUCTION ENVIRONMENT !!!

                                                            property onHeaderRow

                                                            onHeaderRow?: GetComponentProps<readonly ColumnType<RecordType>[]>;

                                                              property onRow

                                                              onRow?: GetComponentProps<RecordType>;

                                                                property onScroll

                                                                onScroll?: React.UIEventHandler<HTMLDivElement>;

                                                                  property prefixCls

                                                                  prefixCls?: string;

                                                                    property rowClassName

                                                                    rowClassName?: string | RowClassName<RecordType>;

                                                                      property rowHoverable

                                                                      rowHoverable?: boolean;

                                                                        property rowKey

                                                                        rowKey?: string | keyof RecordType | GetRowKey<RecordType>;

                                                                          property scroll

                                                                          scroll?: {
                                                                          x?: number | true | string;
                                                                          y?: number | string;
                                                                          };

                                                                            property showHeader

                                                                            showHeader?: boolean;

                                                                              property sticky

                                                                              sticky?: boolean | TableSticky;

                                                                                property style

                                                                                style?: React.CSSProperties;

                                                                                  property summary

                                                                                  summary?: (data: readonly RecordType[]) => React.ReactNode;

                                                                                    property tableLayout

                                                                                    tableLayout?: TableLayout;

                                                                                      property tailor

                                                                                      tailor?: boolean;
                                                                                      • Internal usage, may remove by refactor.

                                                                                        !!! DO NOT USE IN PRODUCTION ENVIRONMENT !!!

                                                                                      property transformColumns

                                                                                      transformColumns?: (columns: ColumnsType<RecordType>) => ColumnsType<RecordType>;
                                                                                      • Internal usage, may remove by refactor. Should always use columns instead.

                                                                                        !!! DO NOT USE IN PRODUCTION ENVIRONMENT !!!

                                                                                      interface VirtualTableProps

                                                                                      interface VirtualTableProps<RecordType>
                                                                                      extends Omit<TableProps<RecordType>, 'scroll'> {}

                                                                                        property listItemHeight

                                                                                        listItemHeight?: number;

                                                                                          property scroll

                                                                                          scroll: {
                                                                                          x?: number;
                                                                                          y: number;
                                                                                          };

                                                                                            Type Aliases

                                                                                            type ColumnsType

                                                                                            type ColumnsType<RecordType = unknown> = readonly (
                                                                                            | ColumnGroupType<RecordType>
                                                                                            | ColumnType<RecordType>
                                                                                            )[];

                                                                                              type Reference

                                                                                              type Reference = {
                                                                                              nativeElement: HTMLDivElement;
                                                                                              scrollTo: (config: ScrollConfig) => void;
                                                                                              };

                                                                                                Package Files (9)

                                                                                                Dependencies (6)

                                                                                                Dev Dependencies (44)

                                                                                                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/rc-table.

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