#16 Rüstungsmerkmale werden nicht richtig gespeichert #28

Merged
Byroks merged 1 commits from #16-rüstungs-merkmale into develop 2026-10-28 07:39:30 +01:00
2 changed files with 3 additions and 2 deletions

No files matched your search

+2 -1
View File
@@ -88,8 +88,9 @@ export class M6ItemSheet extends api.HandlebarsApplicationMixin(sheets.ItemSheet
event.preventDefault();
const currentInput = event.currentTarget;
const value = currentInput.value;
const location = currentInput.name || currentInput.id;
console.log("Feld verlassen! Aktueller Wert:", value);
this.item.update({ [`${currentInput.name}`]: value.split(/[\s,]+/) });
this.item.update({ [`${location}`]: value.split(/[\s,]+/) });
}
/* -------------------------------------------------- */
+1 -1
View File
@@ -63,7 +63,7 @@
<div class="col-12">
<div class="d-flex justify-content-between">
<p>{{localize "Midgard6.Item.waffenmerkmale"}}</p>
<input style="margin-left: 8px;" type="text" data-action="splitIntoArray" id="merkmale" name="system.merkmale" list="merkmalOptions" value="{{splitArray system.merkmale}}">
<input style="margin-left: 8px;" type="text" data-action="splitIntoArray" id="system.merkmale" name="system.merkmale" value="{{splitArray system.merkmale}}">
</div>
</div>
</div>