Skip to content

Commit 4da452f

Browse files
authored
Merge pull request #424 from TechplexEngineer/patch-2
Allow the columns option to be a function
2 parents e9d15a7 + b26bc01 commit 4da452f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

client/tableInit.js

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ function tableInit(tabularTable, template) {
1313

1414
// Loop through the provided columns object
1515
let columns = tabularTable.options.columns || [];
16+
if (typeof tabularTable.options.columns === 'function') {
17+
columns = tabularTable.options.columns();
18+
}
19+
1620
columns = columns.map(column => {
1721
let options = { ...column };
1822

0 commit comments

Comments
 (0)