chore: Minor fix

This commit is contained in:
iamsivin
2025-11-07 21:05:46 +05:30
parent 514e95969a
commit 1ee5b4f9d6
@@ -2,6 +2,7 @@
import { computed, ref, onMounted, nextTick, getCurrentInstance } from 'vue';
import { useToggle } from '@vueuse/core';
import Button from 'dashboard/components-next/button/Button.vue';
const props = defineProps({
modelValue: { type: [String, Number], default: '' },
type: { type: String, default: 'text' },
@@ -34,6 +35,10 @@ const emit = defineEmits([
'enter',
]);
defineOptions({
inheritAttrs: false,
});
// Generate a unique ID per component instance when `id` prop is not provided.
const { uid } = getCurrentInstance();
const uniqueId = computed(() => props.id || `input-${uid}`);
@@ -136,8 +141,8 @@ onMounted(() => {
<div class="relative">
<input
:id="uniqueId"
v-bind="$attrs"
ref="inputRef"
v-bind="$attrs"
:value="modelValue"
:class="[
customInputClass,