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
|
// edit combatant
|
||||||
function editCombatant(e) {
|
function editCombatant(e) {
|
||||||
|
console.log("editing combatant …")
|
||||||
// e.preventDefault();
|
// e.preventDefault();
|
||||||
// validate form
|
// validate form
|
||||||
if (!validateCombatant()) {
|
if (!validateCombatant()) {
|
||||||
@ -314,7 +315,9 @@ function editCombatant(e) {
|
|||||||
ini = (ini != "") ? ini : rollForInitiative(dice, rea);
|
ini = (ini != "") ? ini : rollForInitiative(dice, rea);
|
||||||
// get correct row
|
// get correct row
|
||||||
let index = parseInt($("#combatant-modal").data("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
|
// set new values
|
||||||
$tr.attr("data-true-ini", ini);
|
$tr.attr("data-true-ini", ini);
|
||||||
$tr.find(".combatant-name").text(name);
|
$tr.find(".combatant-name").text(name);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user