summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkInput.vue
diff options
context:
space:
mode:
Diffstat (limited to 'packages/frontend/src/components/MkInput.vue')
-rw-r--r--packages/frontend/src/components/MkInput.vue3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/frontend/src/components/MkInput.vue b/packages/frontend/src/components/MkInput.vue
index b34b7aaf60..cc7ad8bb78 100644
--- a/packages/frontend/src/components/MkInput.vue
+++ b/packages/frontend/src/components/MkInput.vue
@@ -52,6 +52,7 @@ import type { SuggestionType } from '@/utility/autocomplete.js';
import MkButton from '@/components/MkButton.vue';
import { i18n } from '@/i18n.js';
import { Autocomplete } from '@/utility/autocomplete.js';
+import { genId } from '@/utility/id.js';
const props = defineProps<{
modelValue: string | number | null;
@@ -87,7 +88,7 @@ const emit = defineEmits<{
const { modelValue, type, autofocus } = toRefs(props);
const v = ref(modelValue.value);
-const id = Math.random().toString(); // TODO: uuid?
+const id = genId();
const focused = ref(false);
const changed = ref(false);
const invalid = ref(false);