I have a dynamic table in which I am trying to categorise and subcategorise lists like shown in this image using defined tiddler fields.
Those in bold
are the categories
and those in underline italics
are the subcategories
.
Category list was working well -not shown in this demo. But when I tried to add subcategories, the result is not good. Category and subcategory tiddler fields without any fieldvalues for the given filter are also getting listed as category and subcategory headers. How to solve this ?
Below is the code for the subcategory headers
tbl-category-selector={{!!tbl-category-selector-value}}
tbl-category-selector-fieldvalues=`[$(tbl-filter-mod)$get[$(tbl-category-selector)$]enlist-input[]sort[]] +[unique[]]`
tbl-subcategory-selector={{!!tbl-subcategory-selector-value}}
tbl-subcategory-selector-fieldvalues=`[$(tbl-filter-mod)$$(tbl-category-selector)$[$(tbl-category-selector-fieldvalues-variable)$]get[$(tbl-subcategory-selector)$]enlist-input[]] +[unique[]]`
The entire code is at this link ----concerned variables are defined using let widget in the line number -118 to 128