Context
Today the minimum height of the text area is fixed and relies on a component token (approximatively 3 lines).
For chat application, we need a text area that can be on a single line by default (takes less space at the bottom of the screen) and that is dynamically resized when the user writes. Like on WhatsApp app for example.
Description
A singleMinLine boolean parameter must be added to the text area API, set to false by default.
When the user set this parameter to true, the minimum height of the text area component must be equivalent to one line.
Be careful, when singleMinLine is set to true, the auto-resize parameter must be set to true. singleMinLine cannot be set to true if auto-resize is disabled.
Definition of Done
Context
Today the minimum height of the text area is fixed and relies on a component token (approximatively 3 lines).
For chat application, we need a text area that can be on a single line by default (takes less space at the bottom of the screen) and that is dynamically resized when the user writes. Like on WhatsApp app for example.
Description
A
singleMinLineboolean parameter must be added to the text area API, set tofalseby default.When the user set this parameter to
true, the minimum height of the text area component must be equivalent to one line.Be careful, when
singleMinLineis set totrue, theauto-resizeparameter must be set totrue.singleMinLinecannot be set totrueif auto-resize is disabled.Definition of Done
text area(API, doc, demo app)