Skip to content

Commit 4f107d2

Browse files
author
dtbuild
committed
5c03f60b2b8572f1b38e1774fd67aa08450cdabd Fix: Allow column().columnControl.searchList() to be executed on columns without searchList, with no side effects.
https://datatables.net/forums/discussion/81188 Sync to source repo @5c03f60b2b8572f1b38e1774fd67aa08450cdabd
1 parent 5025f42 commit 4f107d2

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

datatables.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
],
1212
"src-repo": "http://github.com/DataTables/ColumnControl",
1313
"last-tag": "1.1.0",
14-
"last-sync": "6f4a0db63288e4662ac172ec158fa2e35e82d37f"
14+
"last-sync": "5c03f60b2b8572f1b38e1774fd67aa08450cdabd"
1515
}

js/dataTables.columnControl.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2868,7 +2868,10 @@ DataTable.Api.registerPlural('columns().columnControl.searchClear()', 'column().
28682868
DataTable.Api.registerPlural('columns().ccSearchClear()', 'column().ccSearchClear()', searchClear);
28692869
DataTable.Api.registerPlural('columns().columnControl.searchList()', 'column().columnControl.searchList()', function (options) {
28702870
return this.iterator('column', function (settings, idx) {
2871-
settings.aoColumns[idx].columnControlSearchList(options);
2871+
var fn = settings.aoColumns[idx].columnControlSearchList;
2872+
if (fn) {
2873+
fn(options);
2874+
}
28722875
});
28732876
});
28742877
DataTable.ext.buttons.ccSearchClear = {

js/dataTables.columnControl.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/dataTables.columnControl.min.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

js/dataTables.columnControl.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2828,7 +2828,10 @@ DataTable.Api.registerPlural('columns().columnControl.searchClear()', 'column().
28282828
DataTable.Api.registerPlural('columns().ccSearchClear()', 'column().ccSearchClear()', searchClear);
28292829
DataTable.Api.registerPlural('columns().columnControl.searchList()', 'column().columnControl.searchList()', function (options) {
28302830
return this.iterator('column', function (settings, idx) {
2831-
settings.aoColumns[idx].columnControlSearchList(options);
2831+
var fn = settings.aoColumns[idx].columnControlSearchList;
2832+
if (fn) {
2833+
fn(options);
2834+
}
28322835
});
28332836
});
28342837
DataTable.ext.buttons.ccSearchClear = {

0 commit comments

Comments
 (0)