mirror of
https://github.com/Pandipipas/scoreko-dev.git
synced 2026-06-06 03:32:06 +00:00
Fixear persistencia de texto libre al salir del select
This commit is contained in:
@@ -151,34 +151,12 @@ const startRightCustomPlayer = () => {
|
||||
const onLeftFilter = (val: string, update: (fn: () => void) => void) => {
|
||||
update(() => {
|
||||
leftFilter.value = val;
|
||||
|
||||
if (!leftFocused.value) {
|
||||
return;
|
||||
}
|
||||
|
||||
leftInput.value = val;
|
||||
scoreboardStore.scoreboard.leftNameOverride = val;
|
||||
|
||||
if (val.trim()) {
|
||||
startLeftCustomPlayer();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const onRightFilter = (val: string, update: (fn: () => void) => void) => {
|
||||
update(() => {
|
||||
rightFilter.value = val;
|
||||
|
||||
if (!rightFocused.value) {
|
||||
return;
|
||||
}
|
||||
|
||||
rightInput.value = val;
|
||||
scoreboardStore.scoreboard.rightNameOverride = val;
|
||||
|
||||
if (val.trim()) {
|
||||
startRightCustomPlayer();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -327,6 +305,35 @@ const saveRightSelectedPlayerChanges = () => {
|
||||
scoreboardStore.scoreboard.rightNameOverride = '';
|
||||
};
|
||||
|
||||
|
||||
watch(
|
||||
leftInput,
|
||||
(value) => {
|
||||
if (!leftFocused.value) {
|
||||
return;
|
||||
}
|
||||
|
||||
scoreboardStore.scoreboard.leftNameOverride = value;
|
||||
if (value.trim()) {
|
||||
startLeftCustomPlayer();
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
watch(
|
||||
rightInput,
|
||||
(value) => {
|
||||
if (!rightFocused.value) {
|
||||
return;
|
||||
}
|
||||
|
||||
scoreboardStore.scoreboard.rightNameOverride = value;
|
||||
if (value.trim()) {
|
||||
startRightCustomPlayer();
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
watch(
|
||||
() => scoreboardStore.scoreboard.leftPlayerId,
|
||||
(playerId) => {
|
||||
|
||||
Reference in New Issue
Block a user