Visibility

The visibility feature provides methods and state for controlling which columns are visible in the table. These properties are available on the table instance when using the column visibility feature. See the column visibility guide for usage examples and configuration details.

PropType
If column pinning, returns a flat array of leaf-node columns that are visible in the unpinned/center portion of the table.
      () => Column<
      TData,
      unknown,
      ColumnMeta
      >[]
      Returns whether all columns are visible
          () => boolean
          Returns whether any columns are visible
              () => boolean
              If column pinning, returns a flat array of leaf-node columns that are visible in the left portion of the table.
                  () => Column<
                  TData,
                  unknown,
                  ColumnMeta
                  >[]
                  If column pinning, returns a flat array of leaf-node columns that are visible in the right portion of the table.
                      () => Column<
                      TData,
                      unknown,
                      ColumnMeta
                      >[]
                      Returns a handler for toggling the visibility of all columns, meant to be bound to a input[type=checkbox] element.
                          () => (
                          event: unknown,
                          ) => void
                          Returns a flat array of columns that are visible, including parent columns.
                              () => Column<
                              TData,
                              unknown,
                              ColumnMeta
                              >[]
                              Returns a flat array of leaf-node columns that are visible.
                                  () => Column<
                                  TData,
                                  unknown,
                                  ColumnMeta
                                  >[]
                                  Resets the column visibility state to the initial state. If defaultState is provided, the state will be reset to {}
                                      (
                                      defaultState?: boolean,
                                      ) => void
                                      Sets or updates the state.columnVisibility state.
                                          (
                                          updater: Updater<VisibilityState>,
                                          ) => void
                                          Toggles the visibility of all columns.
                                              (
                                              value?: boolean,
                                              ) => void
                                              Type
                                              () => Column<
                                              TData,
                                              unknown,
                                              ColumnMeta
                                              >[]
                                              Description
                                              If column pinning, returns a flat array of leaf-node columns that are visible in the unpinned/center portion of the table.
                                                  Type
                                                  () => boolean
                                                  Description
                                                  Returns whether all columns are visible
                                                      Type
                                                      () => boolean
                                                      Description
                                                      Returns whether any columns are visible
                                                          Type
                                                          () => Column<
                                                          TData,
                                                          unknown,
                                                          ColumnMeta
                                                          >[]
                                                          Description
                                                          If column pinning, returns a flat array of leaf-node columns that are visible in the left portion of the table.
                                                              Type
                                                              () => Column<
                                                              TData,
                                                              unknown,
                                                              ColumnMeta
                                                              >[]
                                                              Description
                                                              If column pinning, returns a flat array of leaf-node columns that are visible in the right portion of the table.
                                                                  Type
                                                                  () => (
                                                                  event: unknown,
                                                                  ) => void
                                                                  Description
                                                                  Returns a handler for toggling the visibility of all columns, meant to be bound to a input[type=checkbox] element.
                                                                      Type
                                                                      () => Column<
                                                                      TData,
                                                                      unknown,
                                                                      ColumnMeta
                                                                      >[]
                                                                      Description
                                                                      Returns a flat array of columns that are visible, including parent columns.
                                                                          Type
                                                                          () => Column<
                                                                          TData,
                                                                          unknown,
                                                                          ColumnMeta
                                                                          >[]
                                                                          Description
                                                                          Returns a flat array of leaf-node columns that are visible.
                                                                              Type
                                                                              (
                                                                              defaultState?: boolean,
                                                                              ) => void
                                                                              Description
                                                                              Resets the column visibility state to the initial state. If defaultState is provided, the state will be reset to {}
                                                                                  Type
                                                                                  (
                                                                                  updater: Updater<VisibilityState>,
                                                                                  ) => void
                                                                                  Description
                                                                                  Sets or updates the state.columnVisibility state.
                                                                                      Type
                                                                                      (
                                                                                      value?: boolean,
                                                                                      ) => void
                                                                                      Description
                                                                                      Toggles the visibility of all columns.