Skip to content

Sort cannot be disabled on DataTable #26845

@fhuonder

Description

@fhuonder

According to the documentation, setting onSort to null on a DataColumn disables sorting for this column.
The implementation has a bug there:
onSort is passed with onSort: () => column.onSort(...) to the _buildHeadingCell method. Within _buildHeadingCell it is checked for null but it never can be.
So clicking a headinig cell leads to a "The method 'call' was called on null." error.

Am I missing something or is this a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions