Difference between revisions of "Widget:DCTList"
From LINKS Community Center
Line 304: | Line 304: | ||
const filterState = {}; | const filterState = {}; | ||
− | const | + | const functionOptions = Array.from(document.querySelectorAll('#functions-filter input[type="checkbox"]')); |
− | const | + | const selectedFunctions = functionOptions.filter(checkbox => checkbox.checked).map(checkbox => checkbox.value); |
− | |||
− | |||
− | + | // If all checkboxes are checked, disable the filter. | |
− | + | filterState.functions = selectedFunctions.length === functionOptions.length ? undefined : selectedFunctions; | |
− | filterState.functions = selectedFunctions; | ||
const selectedSources = Array.from(document.querySelectorAll('#data-source-filter input[type="checkbox"]:checked')) | const selectedSources = Array.from(document.querySelectorAll('#data-source-filter input[type="checkbox"]:checked')) |
Revision as of 16:55, 22 August 2022
Development verstion of the DCT List.
Not ready for production!