Textarea `rows` prop on render
I'm setting the Textarea
rows
to 1:
However, it automatically sets to 2 or 4 when it renders.2 Replies
Hi @Olamide. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
I understand you're having an issue with the
rows
prop in the UTextarea
component from Nuxt UI. According to the documentation, the rows
prop should control the number of visible text lines in the textarea, with a default value of 3.
Looking at the documentation for the UTextarea
component, it clearly states that you can use the rows
prop to set the number of rows:
Textarea documentation shows that this prop should work as expected.
However, you're experiencing an issue where setting :rows="1"
results in the textarea rendering with 2 or 4 rows instead. This behavior isn't documented in the knowledge sources provided.
There could be a few potential causes:
1. There might be CSS styles affecting the height calculation
2. The autoresize feature might be interfering (if enabled)
3. There could be a minimum height constraint in the component
If you're using the autoresize feature, try disabling it:
If the issue persists, you might want to check if there are any CSS styles affecting the component or if there's a minimum height constraint in the Nuxt UI implementation. Unfortunately, the knowledge sources don't provide more specific information about this particular issue.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@957789387213656114> Kapa.ai is still learning and improving, please let me know how I did by reacting below.