fix: score panel fonction update

This commit is contained in:
Thibaut Valentin 2026-02-01 15:25:49 +01:00
parent 172dcdaa67
commit e2197d0712

View File

@ -74,7 +74,8 @@ function ScorePanel_({matchId, matchs, match, menuActions, onClickVoid_, vEnd})
lastScoreClick.current = {matchId: matchId, round: maxRound, comb}; lastScoreClick.current = {matchId: matchId, round: maxRound, comb};
} else { } else {
const score = match.scores.find(s => s.n_round === round); const score = match.scores.find(s => s.n_round === round);
setScoreIn((comb === 1 ? score?.s1 : score?.s2) || ""); const tmp= (comb === 1 ? score?.s1 : score?.s2)
setScoreIn((tmp === -1000 ? "" : tmp) || "");
lastScoreClick.current = {matchId: matchId, round, comb}; lastScoreClick.current = {matchId: matchId, round, comb};
setTimeout(() => inputRef.current.select(), 100); setTimeout(() => inputRef.current.select(), 100);
} }
@ -165,7 +166,7 @@ function ScorePanel_({matchId, matchs, match, menuActions, onClickVoid_, vEnd})
return () => { return () => {
document.removeEventListener("mousedown", handleClickOutside); document.removeEventListener("mousedown", handleClickOutside);
}; };
}, []); }, [matchId, match]);
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]') const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
const o = [...tooltipTriggerList] const o = [...tooltipTriggerList]