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 400: Line 400:
             // TODO: REWORK
             // TODO: REWORK


             // // If filterState has a category but subfunctions array is empty, we only care about the category.
             // 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.
             // Array.from(filterState.functions).forEach(([key, subs]) => {
            const emptyCategories = [], nonemptyCategories = [];
            //    if (subs.length > 0) { nonemptyCategories.push(key); } else { emptyCategories.push(key); }
             Array.from(filterState.functions).forEach(([key, subs]) => {
             // });
                if (subs.length > 0) { nonemptyCategories.push(key); } else { emptyCategories.push(key); }
             });


             // console.log(emptyCategories, nonemptyCategories)
             console.log(emptyCategories, nonemptyCategories)
             // return true
             // return true
            // Otherwise, we only care about the subfunctions and category shouldn't be checked.


             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!