web/admin: only set ?writeOnly when editing an object

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-04-04 20:11:57 +02:00
parent 93b362570d
commit 85121de9d7
5 changed files with 6 additions and 6 deletions

View File

@ -60,7 +60,7 @@ export class HorizontalFormElement extends LitElement {
if (this.writeOnly && !this.writeOnlyActivated) {
const i = (input as HTMLInputElement);
i.setAttribute("hidden", "true");
const handler = (ev: Event) => {
const handler = () => {
i.removeAttribute("hidden");
this.writeOnlyActivated = true;
i.parentElement?.removeEventListener("click", handler);