Typescript DataTables with filters don't import or compile correctly. #2467
Labels
Type: Enhancement
Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone
I'm submitting a ... (check one with "x")
Codesandbox Case (Bug Reports)
https://codesandbox.io/s/ykcro
This is the same codesandbox linked from the TS documentation on DataTable's filter page.
Current behavior
FilterMatchMode imports as an interface, not an object. The objects/types used on the DataTable component down the file are also incorrect. This causes compilation to break unless errors are ignored.
Expected behavior
FilterMatchMode should import the actual object instead of the interface. DataTables should be using the correct interfaces when passing props. Compilation should work without ignoring all errors.
Minimal reproduction of the problem with instructions
Import FilterMatchMode and try to use it by calling FilterMatchMode.CONTAINS.
Please tell us about your environment:
Azure VM, VSCode Community 2019, Nextjs 12.0.1, typescript 4.4.4, eslint 7.32.0
React version:
17.0.2
PrimeReact version:
Tried in both 7.0.0-rc2 and 7.0.1.
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
Chrome
Language: [all | TypeScript X.X | ES6/7 | ES5]
Typescript 4.4.4
The text was updated successfully, but these errors were encountered: