We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4870ab commit 42e61d3Copy full SHA for 42e61d3
adminforth/spa/src/afcl/Input.vue
@@ -9,6 +9,7 @@
9
10
<!-- translate needed for bumping ring above prefix without z-index -->
11
<input
12
+ ref="input"
13
v-bind="$attrs"
14
:type="type"
15
@input="$emit('update:modelValue', $event.target?.value)"
@@ -31,6 +32,8 @@
31
32
33
<script setup lang="ts">
34
35
+import { ref } from 'vue';
36
+
37
const props = defineProps({
38
type: String,
39
fullWidth: Boolean,
@@ -39,6 +42,11 @@ const props = defineProps({
42
prefix: String,
40
43
})
41
44
45
+const input = ref<HTMLInputElement | null>(null)
46
47
+defineExpose({
48
+ focus: () => input.value?.focus(),
49
+});
50
51
</script>
52
0 commit comments