api row() and cell() lack of typing
api row() and cell() lack of typing
Hi.
Link to test case:
https://stackblitz.com/edit/vitejs-vite-zcrl5ek8?file=src%2Fmain.ts
Debugger code (debug.datatables.net):
N/A
Error messages shown:
Object literal may only specify known properties, and 'focused' does not exist in type
'Node | JQuery<HTMLElement> | ((idx: number, data: any, node: Node | null) => boolean) | RowSelector<any>[]'. (2353)
Description of problem:
I'm working with DataTables (keytable extension included) and TypeScript. These two method overloads appear to be missing the proper typing for selector modifiers:
https://datatables.net/reference/api/cell()#cell(-[-modifier-]-)
https://datatables.net/reference/api/row()#row(-[-modifier-]-)
Using selector modifiers such as { focused: true } results in a TypeScript error, even though it is valid according to the documentation.
Would you like me to submit a PR to address this?
This question has an accepted answers - jump to answer
Answers
Hi,
Thanks for flagging this up. I noticed this as well fairly recently and have committed a fix that is currently on the
dt3branch for KeyTable. I'm getting close to releasing a beta release of DataTables 3, and will include betas for (most) of the extensions at the same time, including KeyTable.Allan
Thanks Allan