Skip to content

DataGrid / DataList - enableSorting enable by default #320

@jbpenrath

Description

@jbpenrath

On DataGrid / DataList components, the sorting is enabled by default. But if this prop is true but no sortModel is provided a warning is raised.

Should we disable enableSorting by default ?

https://github.com/openfun/cunningham/blob/b4a6367bce2984ac4d671f262faccfbb6204a0b5/packages/react/src/components/DataGrid/index.tsx#L97

e.g: Warning raised during tests

stderr | src/components/DataGrid/index.spec.tsx > <DataGrid/> > should render custom cells
You are using a column with sorting enabled, but you are not providing an `onSortModelChange` handler. The sorting will not work as expected.
You are using a column with sorting enabled, but you are not providing an `onSortModelChange` handler. The sorting will not work as expected.
You are using a column with sorting enabled, but you are not providing an `onSortModelChange` handler. The sorting will not work as expected.
You are using a column with sorting enabled, but you are not providing an `onSortModelChange` handler. The sorting will not work as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions