add category hints from methodlist

This commit is contained in:
dcore94 2023-04-06 16:10:45 +02:00
parent 0b0915a457
commit 9722d09266
1 changed files with 3 additions and 2 deletions

View File

@ -2,7 +2,7 @@ class CCPMethodList extends HTMLElement{
#boot; #boot;
#rootdoc; #rootdoc;
#data; #data = null;
#filtered; #filtered;
#dragged = null; #dragged = null;
#searchfield = null; #searchfield = null;
@ -197,8 +197,9 @@ class CCPMethodList extends HTMLElement{
getCategoryHints(){ getCategoryHints(){
const s = new Set() const s = new Set()
if(this.#data === null) return [];
for(let i=0; i < this.#data.length; i++){ for(let i=0; i < this.#data.length; i++){
const cat = m.metadata.filter(md=>md.role === "category").map(md=>md.title) const cat = this.#data[i].metadata.filter(md=>md.role === "category").map(md=>md.title)
s.add(cat) s.add(cat)
} }
return [...s] return [...s]