Widget: DCTList: Difference between revisions

From LINKS Community Center
Jump to: navigation, search
Eschmidt (talk | contribs)
No edit summary
Eschmidt (talk | contribs)
No edit summary
Line 310: Line 310:
         filterState.functions = selectedFunctions.length === functionOptions.length ? undefined : selectedFunctions;
         filterState.functions = selectedFunctions.length === functionOptions.length ? undefined : selectedFunctions;


         const selectedSources = Array.from(document.querySelectorAll('#data-source-filter input[type="checkbox"]:checked'))
         const sourceOptions = Array.from(document.querySelectorAll('#data-source-filter input[type="checkbox"]'));
            .map(checkbox => checkbox.value);
        const selectedSources = sourceOptions.filter(checkbox => checkbox.checked).map(checkbox => checkbox.value);
         filterState.dataSources = selectedSources;
 
        // If all checkboxes are checked, disable the filter.
         filterState.dataSources = selectedSources.length === sourceOptions.length ? undefined : selectedSources;


         table.setFilter(dctFilter, filterState);
         table.setFilter(dctFilter, filterState);

Revision as of 16:00, 22 August 2022

Development verstion of the DCT List.
Not ready for production!