Skip to content

Table header - extend interface TableColumnSchema with optional sortingField #65

Description

@SanderVanHullebusch

The row value key doens't necessarily correspond with the field we want to sort.

On click of the column header, we add this key as a query param to our API call. Since we f.e. want to show a name, this isn't the sortingField we want to send to the API, but rather the id.

  • Add sortingField?: string; to interface TableColumnSchema
  • Update TableHeader.tsx's onSortClick(col.value)} to onSortClick(col?.sortingField ?? col.value)} so that we can sort on a different key.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions