add category hints from methodlist

This commit is contained in:
dcore94 2023-04-06 17:25:33 +02:00
parent 459347d948
commit c8938108c3
1 changed files with 2 additions and 2 deletions

View File

@ -597,8 +597,8 @@ class CCPMethodEditorController extends HTMLElement{
ev.preventDefault()
ev.stopPropagation()
if(ev.target.getAttribute('name') === "delete-category"){
const index = ev.target.getAttribute("data-index")
this.#current.metadata.filter(md=>md.role === "category").splice(index, 1)
const val = ev.target.parentElement.title
this.#current.metadata = this.#current.metadata.filter(md=>md.role !== "category" || md.title !== val)
this.reRenderCategories()
this.#rootdoc.querySelector("input[name=category-input]").focus()
}