mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-24 01:31:44 +00:00
Correctly stringify numbers in textboxes (#921)
* fix an issue where the fov isnt reset on error * Fix issue with incorrectly reading fov on update * Properly handle NPE in case of error * Fix issue with vuetify comps not converting strings to numbers * Formatting fixes
This commit is contained in:
@@ -32,7 +32,12 @@ const localValue = computed<[number, number]>({
|
||||
get: (): [number, number] => {
|
||||
return Object.values(props.value) as [number, number];
|
||||
},
|
||||
set: (v) => emit("input", v)
|
||||
set: (v) => {
|
||||
for (let i = 0; i < v.length; i++) {
|
||||
v[i] = parseFloat(v[i] as unknown as string);
|
||||
}
|
||||
emit("input", v);
|
||||
}
|
||||
});
|
||||
|
||||
const changeFromSlot = (v: number, i: number) => {
|
||||
|
||||
@@ -27,7 +27,7 @@ const emit = defineEmits<{
|
||||
|
||||
const localValue = computed({
|
||||
get: () => props.value,
|
||||
set: (v) => emit("input", v)
|
||||
set: (v) => emit("input", parseFloat(v as unknown as string))
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user