add category hints from methodlist

This commit is contained in:
dcore94 2023-04-06 16:14:19 +02:00
parent 9722d09266
commit 207ecc31c9
1 changed files with 1 additions and 1 deletions

View File

@ -763,9 +763,9 @@ class CCPMethodEditorController extends HTMLElement{
} }
renderCategoryHints(){ renderCategoryHints(){
const s = new Set(["Uncategorized", this.getCurrentCategory()])
const ml = document.querySelector("d4s-ccp-methodlist") const ml = document.querySelector("d4s-ccp-methodlist")
const cats = ml ? [...s].concat(ml.getCategoryHints()) : [...s] const cats = ml ? [...s].concat(ml.getCategoryHints()) : [...s]
if(cats.indexOf("Uncategorized") === -1) cats.push("Uncategorized")
return ` return `
<datalist id="categoryhints"> <datalist id="categoryhints">
${cats.map(c=>`<option value="${c}">${c}</option>`)} ${cats.map(c=>`<option value="${c}">${c}</option>`)}