Skip to content

When sorting is enabled, the initialSort should not be the first sortable column #10

@carlosthe19916

Description

@carlosthe19916

I noticed that when sorting is enabled and no initialSort is defined, then by default the initialSort is set to the first sortable column. I think that if initialSort is not set by the user, then it should remain "null"

To be more precise, this is the block of code I'm reffering to: https://github.com/patternfly-labs/react-table-batteries/blob/main/packages/module/src/hooks/sorting/useSortState.ts#L77-L79

Wouldn't it be better if we replace it with something like

const initialSort = (isSortEnabled && args.initialSort) || null;

This is more a design topic rather than a direct bug.

Metadata

Metadata

Assignees

No one assigned

    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