Sorting

The sorting feature provides methods and state for sorting table rows by one or more columns. These properties are available on the table instance when using the sorting feature. See the sorting guide for usage examples and configuration details.

PropType
Returns the row model for the table before any sorting has been applied.
      () => {
      flatRows: Row[]
      rows: Row[]
      rowsById: Record
      }
      Returns the row model for the table after sorting has been applied.
          () => {
          flatRows: Row[]
          rows: Row[]
          rowsById: Record
          }
          Resets the sorting state to initialState.sorting, or true can be passed to force a default blank state reset to [].
              (
              defaultState?: boolean,
              ) => void
              Sets or updates the state.sorting state.
                  (
                  updater:
                  | T
                  | ((old: T) => T),
                  ) => void
                  Type
                  () => {
                  flatRows: Row[]
                  rows: Row[]
                  rowsById: Record
                  }
                  Description
                  Returns the row model for the table before any sorting has been applied.
                      Type
                      () => {
                      flatRows: Row[]
                      rows: Row[]
                      rowsById: Record
                      }
                      Description
                      Returns the row model for the table after sorting has been applied.
                          Type
                          (
                          defaultState?: boolean,
                          ) => void
                          Description
                          Resets the sorting state to initialState.sorting, or true can be passed to force a default blank state reset to [].
                              Type
                              (
                              updater:
                              | T
                              | ((old: T) => T),
                              ) => void
                              Description
                              Sets or updates the state.sorting state.