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.preventDefault()
ev.stopPropagation() ev.stopPropagation()
if(ev.target.getAttribute('name') === "delete-category"){ if(ev.target.getAttribute('name') === "delete-category"){
const index = ev.target.getAttribute("data-index") const val = ev.target.parentElement.title
this.#current.metadata.filter(md=>md.role === "category").splice(index, 1) this.#current.metadata = this.#current.metadata.filter(md=>md.role !== "category" || md.title !== val)
this.reRenderCategories() this.reRenderCategories()
this.#rootdoc.querySelector("input[name=category-input]").focus() this.#rootdoc.querySelector("input[name=category-input]").focus()
} }