Skip to content

Commit

Permalink
f4bf5d569c7998bb6c659301a8af28c13aefef97 Typescript: Add select() r…
Browse files Browse the repository at this point in the history
…enderer to types

https://datatables.net/forums/discussion/79728

Sync to source repo @f4bf5d569c7998bb6c659301a8af28c13aefef97
  • Loading branch information
dtbuild committed Aug 26, 2024
1 parent 9927689 commit c240356
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion datatables.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
],
"src-repo": "http://github.com/DataTables/Select",
"last-tag": "2.0.5",
"last-sync": "1fee5abfa07d91f71ab0e9cb5f7eb4cab9075603"
"last-sync": "f4bf5d569c7998bb6c659301a8af28c13aefef97"
}
22 changes: 21 additions & 1 deletion types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/// <reference types="jquery" />

import DataTables from 'datatables.net';
import DataTables, {ObjectColumnRender} from 'datatables.net';

export default DataTables;

Expand Down Expand Up @@ -107,6 +107,26 @@ declare module 'datatables.net' {
version: string;
}
}

interface DataTablesStaticRender {
/**
* Display a checkbox in the column's cells to be used for and represent
* row selection.
*/
select(): ObjectColumnRender;

/**
* Display a checkbox in the column's cells to be used for and represent
* row selection, with the `value` and `name` attributes for the checkbox
* `input` being set by properties from the row's data object.
*
* @param valueProp Name of the data property where the `value` for the
* checkbox is.
* @param nameProp Name of the data property where the `name` for the
* checkbox is.
*/
select(valueProp: string, nameProp: string): ObjectColumnRender;
}
}

interface ConfigSelect {
Expand Down

0 comments on commit c240356

Please sign in to comment.