Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
feat(input): add native autocomplete attribute support
  • Loading branch information
padinko committed Sep 3, 2024
commit c284e7a95f8801f9cb02988630157643eb141191
3 changes: 2 additions & 1 deletion packages/ui/src/components/va-input/VaInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ const props = defineProps({
pattern: { type: String },
inputmode: { type: String, default: 'text' },
counter: { type: Boolean, default: false },
autocomplete: { type: String },

// style
ariaResetLabel: useTranslationProp('$t:reset'),
Expand Down Expand Up @@ -227,7 +228,7 @@ const computedChildAttributes = computed(() => (({

const computedInputAttributes = computed(() => (({
...computedChildAttributes.value,
...pick(props, ['type', 'disabled', 'readonly', 'placeholder', 'pattern', 'inputmode', 'name']),
...pick(props, ['type', 'disabled', 'readonly', 'placeholder', 'pattern', 'inputmode', 'name', 'autocomplete']),
...pick(attrs, ['minlength', 'minlength']),
}) as InputHTMLAttributes))

Expand Down