Widget: DCTList: Difference between revisions
From LINKS Community Center
Eschmidt (talk | contribs) No edit summary |
Eschmidt (talk | contribs) No edit summary |
||
Line 400: | Line 400: | ||
// TODO: REWORK | // TODO: REWORK | ||
// If filterState has a category but subfunctions array is empty, we only care about the category. | |||
// const emptyCategories = [], nonemptyCategories = []; | // Empty categories should only be checked by their name, nonempty - ONLY by subfunctions. | ||
const emptyCategories = [], nonemptyCategories = []; | |||
Array.from(filterState.functions).forEach(([key, subs]) => { | |||
if (subs.length > 0) { nonemptyCategories.push(key); } else { emptyCategories.push(key); } | |||
}); | |||
console.log(emptyCategories, nonemptyCategories) | |||
// return true | // return true | ||
const functionsCheck = filterState.functions | const functionsCheck = filterState.functions |
Revision as of 13:54, 21 November 2022
Development verstion of the DCT List.
Not ready for production!