Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
richardmward opened this issue Nov 19, 2020 · 0 comments
Closed
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@richardmward
Copy link

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.

@cagataycivici cagataycivici self-assigned this Nov 25, 2020
@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Nov 25, 2020
@cagataycivici cagataycivici added this to the 3.0.2 milestone Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants