Skip to content

Commit

Permalink
fixed maxline on number field
Browse files Browse the repository at this point in the history
  • Loading branch information
sirily11 committed Apr 23, 2020
1 parent 1dae24e commit 4dde3d0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/json_textform/components/JSONTextFormField.dart
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,10 @@ class _JSONTextFormFieldState extends State<JSONTextFormField> {
widget.onSaved(value);
},
key: Key("textfield"),
maxLines: widget.schema.validation?.length?.maximum == null ? 10 : 1,
maxLines: widget.schema.validation?.length?.maximum == null &&
widget.schema.widget == WidgetType.text
? 10
: 1,
controller: _controller,
keyboardType: widget.schema.widget == WidgetType.number
? TextInputType.number
Expand Down

0 comments on commit 4dde3d0

Please sign in to comment.