Widget: DCTList: Difference between revisions
From LINKS Community Center
Eschmidt (talk | contribs) No edit summary |
Eschmidt (talk | contribs) No edit summary |
||
Line 390: | Line 390: | ||
/** | /** | ||
* @param {DCT} dct | * @param {DCT} dct | ||
*/ | */ | ||
function dctFilter(dct, filterState) { | function dctFilter(dct, filterState) { | ||
Line 400: | Line 399: | ||
// TEMPORARY!!! | // TEMPORARY!!! | ||
// TODO: REWORK | // TODO: REWORK | ||
// If filterState has a category but subfunctions array is empty, we only care about the category. | |||
const emptyCategories = Array.from(filterState.functions) | |||
console.log(emptyCategories) | |||
return true | |||
// Otherwise, we only care about the subfunctions and category shouldn't be checked. | |||
const functionsCheck = filterState.functions | const functionsCheck = filterState.functions | ||
? dctFunctions.some(func => filterState.functions.includes(func)) | ? dctFunctions.some(func => filterState.functions.includes(func)) | ||
Line 444: | Line 451: | ||
} | } | ||
}); | }); | ||
filterState.functions = funcOpts; | |||
} | } | ||
const sourceOptions = Array.from(document.querySelectorAll('#data-source-filter input[type="checkbox"]')); | const sourceOptions = Array.from(document.querySelectorAll('#data-source-filter input[type="checkbox"]')); | ||
Line 730: | Line 732: | ||
// TODO: Check the bugfix for a possible infinite event loop. | // TODO: Check the bugfix for a possible infinite event loop. | ||
// This will help detect it, in case it happens. | // This will help detect it, in case it happens. | ||
console.log('Table height bugfix: render complete.'); | // console.log('Table height bugfix: render complete.'); | ||
try { | try { |
Revision as of 16:58, 18 November 2022
Development verstion of the DCT List.
Not ready for production!