mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
[DataTables.net-buttons] Added LanguageSettings (#39379)
This commit is contained in:
committed by
Nathan Shively-Sanders
parent
979db3f08d
commit
eee5458d48
@@ -150,6 +150,45 @@ const config_3: DataTables.ButtonsSettings = {
|
||||
}
|
||||
};
|
||||
|
||||
const config_4: DataTables.Settings = {
|
||||
// Buttons change text
|
||||
buttons: [{
|
||||
extend: 'excel',
|
||||
text: 'Excel',
|
||||
className: 'class',
|
||||
filename: "exported_file.csv",
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'excel',
|
||||
text: 'Excel',
|
||||
className: 'class',
|
||||
filename: "exported_file.csv",
|
||||
exportOptions: {
|
||||
columns: [1, 6, 2, 3, 4]
|
||||
}
|
||||
},
|
||||
{
|
||||
action(e, dt, node, config) { },
|
||||
available(dt, config) { return true; },
|
||||
destroy(dt, node, config) { },
|
||||
enabled: true,
|
||||
init(dt, node, config) { },
|
||||
key: 'a',
|
||||
name: 'name',
|
||||
namespace: 'namespace',
|
||||
titleAttr: 'title',
|
||||
title: 'title'
|
||||
}],
|
||||
language: {
|
||||
buttons: {
|
||||
excel: 'this is excel button'
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
// Statics
|
||||
const buttons = new $.fn.dataTable.Buttons($("selector").DataTable(), config_3);
|
||||
const version = $.fn.dataTable.Buttons.version;
|
||||
|
||||
+4
@@ -15,6 +15,10 @@ declare namespace DataTables {
|
||||
buttons?: boolean | string[] | ButtonsSettings | ButtonSettings[];
|
||||
}
|
||||
|
||||
interface LanguageSettings {
|
||||
buttons?: {};
|
||||
}
|
||||
|
||||
interface StaticFunctions {
|
||||
Buttons: ButtonStaticFunctions;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user