0

When autosizing an input (textarea) I’ve created with Element Plus for Vue 3, a new line is created before the text reaches the end of the line being typed. This makes the input box unnecessarily large, and there’s unneeded white space after the text.

Here's a video demo of the issue

Here's my code for the component:

<template>
        <el-input
                :autosize="{ minRows: 1, maxRows: 16 }"
                type='textarea' 
                :input-style="{
                        
                        border: '0px',
                        fontSize: 'large',
                        paddingTop:'15px',
                        paddingBottom:'15px',
                        borderRadius:'0',
                        backgroundColor: 'transparent',
                        minWidth: '100%'                      

                }"
                
            />
 
</template>

<script>


</script>

<style>

</style>

And here's the docs https://element-plus.org/en-US/component/input.html

Any ideas how to fix? Thanks.

Mark Okoh
  • 51
  • 1
  • 4
  • When I add your code into an empty project (with a v-model) attribute it works. Are there extra spaces being added to the model? - Try adding a 'watch' (https://vuejs.org/guide/essentials/watchers.html#basic-example) and log the model to see if anything strange is happening. – Jon Freynik Sep 15 '22 at 19:44

0 Answers0