Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

Add sorting functionality #7

@jslatts

Description

@jslatts

The time has come to finally do this. Add sorting hooks to table table.

  • Optionally enabled per column
  • Create new key value for each column
  • Track sorting state externally

Proposed API snippets

For component level API

          <Tabletable data={data}
            onSort={props.onOutputSort}
            sortCriteria={{ 'key': props.sortCol, 'direction': props.sortDirection }}
            totalRows={currentOutputsCollection.get('totalSize')}
            columns={columnDefs}
            onClear={handleFilterClear}
            onSearch={(filterValue: string) => props.filterOutputsByText(filterValue)} // If we are only showing selected, request noCache on searches
            filterValue={props.filterValue}
            rowsPerPage={50}
            showFilter={true}
            pagerSize={7}
            currentPage={props.page}
            onPageChange={handleTablePageChange}
            showSpinner={props.showLoadingScreen}
            spinner={<LoadingScreen text={`Loading ${props.outputAbbrv}s...`} />}>
          </Tabletable>

For column header definition:

      display: 'Name',
      key: 'outputName',
      sortable: true,

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions