Skip to content

DataTable sortField allows a function, but the prop type is only a string #647

Closed
@richardmward

Description

@richardmward

Hi,

The docs say that you can use the sortField on a DataTable Column, as such (data) => customFieldResolver(...). The implementation works as it falls into ObjectUtils.resolveFieldData, which checks for typeof === "function", however the Column props type is set to String so the console is filled with warnings. It'd be nice if the prop type could be altered to allow either a string or function, avoiding these errors.

Activity

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

Metadata

Metadata

Assignees

Labels

Type: BugIssue contains a bug related to a specific component. Something about the component is not working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions