DataTable: DataTableSortMeta field missing type definition #5862
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
When using
DataTable
withsort="multiple"
and pre filtering a column withmulti-sort-meta
, themulti-sort-meta
prop is of typeDataTableSortMeta
, which is defined like this :But if we use a custom sorting function in the column with the
sort-field
prop and want it to be used in the initial sorting, we can pass it tofield
in themulti-sort-meta
prop ofDataTable
.If you look at the example, a function is passed and it works correctly.
But if you remove the
@ts-nocheck
at line 2, typescript will throw an error.I think the DataTableSortMeta
field
prop should have this type instead:Reproducer
https://stackblitz.com/edit/vitejs-vite-7s9x9r?file=src%2FApp.vue
PrimeVue version
3.52.0
Vue version
3.x
Language
TypeScript
Build / Runtime
Vite
Browser(s)
No response
Steps to reproduce the behavior
@ts-nocheck
at line 2Expected behavior
Typescript should not throw an error
The text was updated successfully, but these errors were encountered: