text entity can have minimum lines count

This commit is contained in:
Jakub Trllo 2023-04-08 17:23:24 +02:00
parent cd756ba215
commit 986def10ad
2 changed files with 3 additions and 0 deletions

View file

@ -448,6 +448,8 @@ class TextEntity(InputEntity):
self.multiline = self.schema_data.get("multiline", False)
self.placeholder_text = self.schema_data.get("placeholder")
self.value_hints = self.schema_data.get("value_hints") or []
self.minimum_lines_count = (
self.schema_data.get("minimum_lines_count") or 0)
def schema_validations(self):
if self.multiline and self.value_hints:

View file

@ -380,6 +380,7 @@ How output of the schema could look like on save:
- simple text input
- key `"multiline"` allows to enter multiple lines of text (Default: `False`)
- key `"placeholder"` allows to show text inside input when is empty (Default: `None`)
- key `"minimum_lines_count"` allows to define minimum size hint for UI. Can be 0-n lines.
```
{