Skip to content

Commit

Permalink
feat(BaseTextarea): expose fitSize prop
Browse files Browse the repository at this point in the history
close #23
  • Loading branch information
stafyniaksacha committed Aug 28, 2023
1 parent 85b82be commit 3f7be0b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions components/form/BaseTextarea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ const value = useVModel(
},
{
passive: true,
}
},
)
const textareaRef = ref<HTMLTextAreaElement>()
Expand All @@ -206,14 +206,19 @@ watch(
async () => {
await nextTick()
fitSize()
}
},
)
defineExpose({
/**
* The underlying HTMLTextAreaElement element.
*/
el: textareaRef,
/**
* A method to resize the textarea to fit its content.
*/
fitSize,
})
const id = useNinjaId(() => props.id)
Expand Down

0 comments on commit 3f7be0b

Please sign in to comment.