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