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 sortFunction Typescript definition wrong #898

Closed
larry-s opened this issue May 21, 2019 · 0 comments
Closed

DataTable sortFunction Typescript definition wrong #898

larry-s opened this issue May 21, 2019 · 0 comments
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@larry-s
Copy link

larry-s commented May 21, 2019

I'm submitting a ... (check one with "x")

[x] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://forum.primefaces.org/viewforum.php?f=57

Current behavior
The Typescript definition of sortFunction in Column.d.ts does not match the description in the documentation. https://www.primefaces.org/primereact/#/datatable This causes Typescript errors when defining the sort function.
The Typescript definition is: sortFunction?(): void;

Expected behavior
The Typescript definition should be: sortFunction?({field:string, order:number}): any[];

Please tell us about your environment:
Windows 10, WebStorm

  • React version:
    16.8.6

  • PrimeReact version:
    3.1.2

  • Browser:
    all

  • Language:
    TypeScript

@mertsincan mertsincan self-assigned this May 21, 2019
@mertsincan mertsincan added this to the 3.1.4 milestone May 21, 2019
@mertsincan mertsincan added the Type: Bug Issue contains a defect related to a specific component. label May 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

No branches or pull requests

2 participants