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) => {
|
const onLeftFilter = (val: string, update: (fn: () => void) => void) => {
|
||||||
update(() => {
|
update(() => {
|
||||||
leftFilter.value = val;
|
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) => {
|
const onRightFilter = (val: string, update: (fn: () => void) => void) => {
|
||||||
update(() => {
|
update(() => {
|
||||||
rightFilter.value = val;
|
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 = '';
|
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(
|
watch(
|
||||||
() => scoreboardStore.scoreboard.leftPlayerId,
|
() => scoreboardStore.scoreboard.leftPlayerId,
|
||||||
(playerId) => {
|
(playerId) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user