Fixed bug that prevented showing edited values in the table.
This commit is contained in:
parent
91ee90d1b9
commit
774762da56
@ -300,6 +300,7 @@ console.log("damageType is", damageType);
|
||||
|
||||
// edit combatant
|
||||
function editCombatant(e) {
|
||||
console.log("editing combatant …")
|
||||
// e.preventDefault();
|
||||
// validate form
|
||||
if (!validateCombatant()) {
|
||||
@ -314,7 +315,9 @@ function editCombatant(e) {
|
||||
ini = (ini != "") ? ini : rollForInitiative(dice, rea);
|
||||
// get correct row
|
||||
let index = parseInt($("#combatant-modal").data("row"));
|
||||
$tr = $("tr.combatant-row").eq(index);
|
||||
console.log("row index is", index);
|
||||
let $tr = $("tr.combatant-row").eq(index);
|
||||
console.log("row is", $tr);
|
||||
// set new values
|
||||
$tr.attr("data-true-ini", ini);
|
||||
$tr.find(".combatant-name").text(name);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user