Skip to content

[Feature Request] VTextarea: Emit on row count changes #21133

Open
@randompixel

Description

@randompixel

Problem to solve

I'd like to be able to react to when the size of the VTextarea changes while auto-grow is true. I'd like to be able to pull the current number of rows the input is set to and change other attributes based on this. This should not return more than max-rows. For example, if rows = 1, then border = "pill" but if rows >= 2 then border="lg"

Currently I'd have to manually calculate the height of the box, essentially duplicating the calculateInputHeight() function in the component which seems wasteful (and bug prone!)

Proposed solution

I'd like it to emit the row count (emit: ['update:rows']?) when rows.value changes. If the value hasn't changed then the emit shouldn't fire.

(This is perhaps related to #9658 but not quite the same)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions