Skip to content

Commit

Permalink
Merge remote-tracking branch 'chill/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
nlfiedler committed Mar 13, 2023
2 parents d9c1faf + bd0ca1a commit 088a2ce
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/src/chips_input.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class ChipsInput<T> extends StatefulWidget {
this.textOverflow = TextOverflow.clip,
this.obscureText = false,
this.autocorrect = true,
this.ensureVisible = true,
this.actionLabel,
this.inputAction = TextInputAction.done,
this.keyboardAppearance = Brightness.light,
Expand Down Expand Up @@ -76,6 +77,7 @@ class ChipsInput<T> extends StatefulWidget {
final TextInputAction inputAction;
final Brightness keyboardAppearance;
final bool autofocus;
final bool ensureVisible;
final bool allowChipEditing;
final FocusNode? focusNode;
final List<T>? initialSuggestions;
Expand Down Expand Up @@ -300,7 +302,9 @@ class ChipsInputState<T> extends State<ChipsInput<T>>
_textInputConnection?.show();
}

_scrollToVisible();
if (widget.ensureVisible) {
_scrollToVisible();
}
}

void _scrollToVisible() {
Expand Down

0 comments on commit 088a2ce

Please sign in to comment.