Widget: DCTList: Difference between revisions
From LINKS Community Center
Eschmidt (talk | contribs) No edit summary |
Eschmidt (talk | contribs) No edit summary |
||
Line 96: | Line 96: | ||
*/ | */ | ||
function dctFilter(dct, filterState) { | function dctFilter(dct, filterState) { | ||
return dct.dataSources.some(source => filterState.dataSources.includes(source)); | return dct.dataSources.some(source => filterState.dataSources.includes(source)); | ||
} | } | ||
Line 142: | Line 141: | ||
}); | }); | ||
table.on('tableBuilt', () => { table.setData(dcts); }); | table.on('tableBuilt', () => { table.setData(dcts); }); | ||
table.on("dataFiltered", (filters, rows) => { | |||
console.log(filters) | |||
//filters - array of filters currently applied | |||
//rows - array of row components that pass the filters | |||
}); | |||
document.getElementById('data-source-filter').addEventListener('change', event => { | document.getElementById('data-source-filter').addEventListener('change', event => { |
Revision as of 14:06, 8 June 2022
Development verstion of the DCT List.
Not ready for production!