File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -884,7 +884,6 @@ impl<'array> ArrayTable<'array> {
884884 row_index : table_row_index,
885885 is_pinned_column_table : pinned_column_table,
886886 } ) ;
887- ui. ctx ( ) . memory_mut ( |m| m. request_focus ( self . table_id ) ) ;
888887
889888 } else {
890889 textedit_response. request_focus ( ) ;
@@ -1086,6 +1085,9 @@ impl<'array> ArrayTable<'array> {
10861085 if response. hovered ( ) {
10871086 ui. ctx ( ) . set_cursor_icon ( CursorIcon :: Cell ) ;
10881087 }
1088+ if updated_value. is_some ( ) {
1089+ ui. ctx ( ) . memory_mut ( |m| m. request_focus ( self . table_id ) ) ;
1090+ }
10891091 Some ( response)
10901092 } ) ;
10911093 }
Original file line number Diff line number Diff line change @@ -105,11 +105,11 @@ impl ObjectTable {
105105 row_index : table_row_index,
106106 is_pinned_column_table : false ,
107107 } ) ;
108- ui. ctx ( ) . memory_mut ( |m| m. request_focus ( self . table_id ) ) ;
109108
110109 } else {
111110 textedit_response. request_focus ( ) ;
112111 }
112+
113113 None
114114 } else {
115115 let rect = ui. available_rect_before_wrap ( ) ;
@@ -175,6 +175,9 @@ impl ObjectTable {
175175 self . was_editing = true ;
176176 }
177177 } ) ;
178+ if self . was_editing {
179+ ui. ctx ( ) . memory_mut ( |m| m. request_focus ( self . table_id ) ) ;
180+ }
178181 array_response
179182 }
180183
You can’t perform that action at this time.
0 commit comments