fix(ui_kit): fix tab action focus on textinputs
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
a68da15cdc
commit
49b534d145
@ -250,9 +250,11 @@ class TextInputScreen extends CubitScreen<TextInputCubit, TextInputState> {
|
||||
Widget onBuild(BuildContext context, TextInputState state) {
|
||||
final style = _resolve(context, state);
|
||||
return Focus(
|
||||
descendantsAreFocusable: true,
|
||||
onFocusChange: (hasFocus) {
|
||||
if (hasFocus) {
|
||||
bloc(context).onFocus();
|
||||
(focusNode ?? _focusNode).requestFocus();
|
||||
} else {
|
||||
bloc(context).onUnfocus();
|
||||
}
|
||||
@ -279,6 +281,7 @@ class TextInputScreen extends CubitScreen<TextInputCubit, TextInputState> {
|
||||
expand: expand ?? true,
|
||||
expanded: _wrapperExpanded(state),
|
||||
child: TextField(
|
||||
focusNode: focusNode ?? _focusNode,
|
||||
onTap: onTap,
|
||||
onChanged: (value) {
|
||||
onChanged?.call(value);
|
||||
@ -290,7 +293,6 @@ class TextInputScreen extends CubitScreen<TextInputCubit, TextInputState> {
|
||||
},
|
||||
onTapOutside: onTapOutside,
|
||||
controller: controller ?? _controller,
|
||||
focusNode: focusNode ?? _focusNode,
|
||||
textAlignVertical: textAlignVertical ?? TextAlignVertical.top,
|
||||
style: style.inputStyle ?? this.style,
|
||||
decoration: InputDecoration(
|
||||
|
Loading…
x
Reference in New Issue
Block a user