Skip to content

Commit

Permalink
chore: run make format
Browse files Browse the repository at this point in the history
  • Loading branch information
hroth1994 committed Sep 10, 2024
1 parent e778193 commit 2fda6a5
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions es-ds-components/components/es-form-textarea.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script setup lang="ts">
// Prevents attributes from being applied to first <div>
// v-bind="$attr" is on the input instead
defineOptions({
Expand Down Expand Up @@ -35,7 +34,7 @@ const props = defineProps({
modelValue: {
type: String,
required: true,
default: "",
default: '',
},
/**
* state
Expand All @@ -53,9 +52,12 @@ watch(localValue, (newValue) => {
emit('update:modelValue', newValue);
});
// Watch for prop changes and update the local value
watch(() => props.modelValue, (newValue) => {
localValue.value = newValue;
});
watch(
() => props.modelValue,
(newValue) => {
localValue.value = newValue;
},
);
const slots = useSlots();
Expand Down Expand Up @@ -83,10 +85,10 @@ const hasError = () => !!slots.errorMessage;

<div class="input-holder">
<textarea
:id="id"
v-model="localValue"
class="es-form-textarea w-100 form-control"
:class="{ 'is-invalid': state === false }"
v-model="localValue"
:id="id"
:disabled="disabled"
:invalid="state === false" />
<small
Expand Down

0 comments on commit 2fda6a5

Please sign in to comment.