Skip to content

Commit

Permalink
8ac1bbb1069ef36fca3bdf3eb2561cff47d4c5a1 Dev: Fix - missing a few ext…
Browse files Browse the repository at this point in the history
…end parameters and incorrect extension for html5 button types

Sync to source repo @8ac1bbb1069ef36fca3bdf3eb2561cff47d4c5a1
  • Loading branch information
dtbuild committed Aug 27, 2024
1 parent 7d327d5 commit cb89700
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion datatables.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
],
"src-repo": "http://github.com/DataTables/Buttons",
"last-tag": "3.1.1",
"last-sync": "d010691ef515cd56cb2cca27f001734ebb3af005"
"last-sync": "8ac1bbb1069ef36fca3bdf3eb2561cff47d4c5a1"
}
24 changes: 17 additions & 7 deletions types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -518,43 +518,50 @@ declare module 'datatables.net' {
export interface Buttons {
/** Selected columns with individual buttons - toggle column visibility */
columnsToggle: {
extend: 'columnsToggle';
columns?: ColumnSelector;
columnText?: string;
};

/** Single button to toggle column visibility */
columnToggle: {
extend: 'columnToggle';
columns?: ColumnSelector;
columnText?: string;
};

/** Selected columns with individual buttons - set column visibility */
columnsVisibility: {
extend: 'columnsVisibility';
columns?: ColumnSelector;
columnText?: string;
visibility: boolean;
};

/** Single button to set column visibility */
columnVisibility: {
extend: 'columnVisibility';
columns?: ColumnSelector;
columnText?: string;
visibility: boolean;
};

/** Restore column visibility to what it was when the table loaded */
colvisRestore: ButtonConfig;
colvisRestore: {
extend: 'colvisRestore';
};

/** Set the column visibility for columns (both show and hide) */
colvisGroup: {
extend: 'colvisGroup';
show: ColumnSelector;
hide: ColumnSelector;
};

/** Copy table data to clipboard */
copy: {
extend: 'copy',
exportOptions?: ButtonExportOptions,
extend: 'copy';
exportOptions?: ButtonExportOptions;
fieldSeparator?: string;
fieldBoundary?: string;
header?: boolean;
Expand All @@ -580,7 +587,7 @@ declare module 'datatables.net' {
footer?: boolean;
};

csvHtml5: Buttons['copy'];
csvHtml5: Buttons['csv'];

/** Create an Excel XLSX file with the table data */
excel: {
Expand All @@ -599,7 +606,7 @@ declare module 'datatables.net' {
customize?: null | ((win: Window, conf: Buttons['print'], dt: Api<any>) => void);
};

excelHtml5: Buttons['copy'];
excelHtml5: Buttons['excel'];

/** Construct a view of the table suitable for printing */
print: {
Expand Down Expand Up @@ -632,7 +639,7 @@ declare module 'datatables.net' {
download?: 'download' | 'open'
};

pdfHtml5: Buttons['copy'];
pdfHtml5: Buttons['pdf'];

/** A spacer to visually separate buttons (not a real button!) */
space: {
Expand All @@ -649,12 +656,15 @@ declare module 'datatables.net' {

/** A collection of column visibility buttons */
colvis: {
extend?: 'colvis',
columns?: ColumnSelector;
columnText?: string;
};

/** Set the table's paging length */
pageLength: {}
pageLength: {
extend?: 'pageLength'
}

/** Split buttons */
split: {}
Expand Down

0 comments on commit cb89700

Please sign in to comment.