Widget: DCTList: Difference between revisions
From LINKS Community Center
Eschmidt (talk | contribs) No edit summary |
Eschmidt (talk | contribs) No edit summary |
||
Line 450: | Line 450: | ||
function applyFilters(clear) { | function applyFilters(clear) { | ||
if (!table) return; | if (!table) return; // prevent filtering before the table is ready | ||
// If clear=true, pass empty object to the filter to disable it. | // If clear=true, pass empty object to the filter to disable it. | ||
Line 462: | Line 462: | ||
if ( | if ( | ||
// Don't pass the filter on if | // Don't pass the filter on if nothing is selected. | ||
document.querySelectorAll('#functions-filter input[type="checkbox"]:checked').length > 0 | |||
document.querySelectorAll('#functions-filter input[type="checkbox"]:checked').length | |||
) { | ) { | ||
const functionFilterBlocks = document.querySelectorAll('#functions-filter .func-filter-block'); | const functionFilterBlocks = document.querySelectorAll('#functions-filter .func-filter-block'); | ||
Line 481: | Line 480: | ||
} | } | ||
const | const selectedSources = Array.from(document.querySelectorAll('#data-source-filter input[type="checkbox"]:checked')) | ||
.map(checkbox => checkbox.value); | |||
filterState.dataSources = | if (selectedSources.length > 0) filterState.dataSources = selectedSources; | ||
const bmOptions = Array.from(document.querySelectorAll('#business-model-filter input[type="checkbox"]')); | const bmOptions = Array.from(document.querySelectorAll('#business-model-filter input[type="checkbox"]')); |
Revision as of 14:13, 9 March 2023
Current version of the DCT List.
Not ready for production!