Skip to content

A self-hosted media server and file management system

fix: input text does not pass attributes correctly

aminnausin0cc86ffd6090
diff --git a/resources/js/components/cedar-ui/input/InputShell.vue b/resources/js/components/cedar-ui/input/InputShell.vue
index 2142c559..169d7f29 100644
--- a/resources/js/components/cedar-ui/input/InputShell.vue
+++ b/resources/js/components/cedar-ui/input/InputShell.vue
@@ -24,6 +24,5 @@ const props = withDefaults(defineProps<InputShellProps>(), { clampText: true });
props.class,
)
"
- v-bind="$attrs"
/>
</template>
diff --git a/resources/js/components/cedar-ui/input/TextInput.vue b/resources/js/components/cedar-ui/input/TextInput.vue
index 5f7203cd..ba629878 100644
--- a/resources/js/components/cedar-ui/input/TextInput.vue
+++ b/resources/js/components/cedar-ui/input/TextInput.vue
@@ -1,19 +1,20 @@
<script setup lang="ts">
-import type { TextInputProps } from '@aminnausin/cedar-ui';
+import type { InputShellProps, TextInputProps } from '@aminnausin/cedar-ui';
import { InputShell } from '.';
import { ref } from 'vue';
import { cn } from '@aminnausin/cedar-ui';
-const model = defineModel();
+defineOptions({ inheritAttrs: false });
-const props = defineProps<TextInputProps>();
+const model = defineModel();
+const props = defineProps<TextInputProps & InputShellProps>();
const el = ref<HTMLInputElement | null>(null);
defineExpose({ el });
</script>
<template>
- <InputShell>
+ <InputShell :clamp-text="clampText">
<template #input="{ class: inputClass }">
<input
ref="el"
@@ -25,6 +26,7 @@ defineExpose({ el });
:placeholder="placeholder"
:class="cn(inputClass, props.class)"
:disabled="disabled"
+ v-bind="$attrs"
/>
</template>
</InputShell>