File tree 2 files changed +26
-1
lines changed
2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,31 @@ impl View {
167
167
self . state = ResourcesList ;
168
168
update_kind = UpdateKind :: Other ;
169
169
}
170
+ key ! ( Enter ) => {
171
+ if let Some ( op) = view. async_ops_table . selected_item ( ) . upgrade ( ) {
172
+ if let Some ( task_id) = op. borrow ( ) . task_id ( ) {
173
+ let task: u64 = task_id. to_string ( ) . parse ( ) . unwrap ( ) ;
174
+ let item = self
175
+ . tasks_list
176
+ . sorted_items
177
+ . iter ( )
178
+ . filter_map ( |i| i. upgrade ( ) )
179
+ . find ( |t| {
180
+ let task_id: u64 =
181
+ t. borrow ( ) . id ( ) . to_string ( ) . parse ( ) . unwrap ( ) ;
182
+ task_id == task
183
+ } ) ;
184
+
185
+ if let Some ( t) = item {
186
+ update_kind = UpdateKind :: SelectTask ( task) ;
187
+ self . state = TaskInstance ( self :: task:: TaskView :: new (
188
+ t,
189
+ state. task_details_ref ( ) ,
190
+ ) ) ;
191
+ }
192
+ }
193
+ }
194
+ }
170
195
_ => {
171
196
// otherwise pass on to view
172
197
view. update_input ( event) ;
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ use std::{cell::RefCell, rc::Rc};
21
21
22
22
pub ( crate ) struct ResourceView {
23
23
resource : Rc < RefCell < Resource > > ,
24
- async_ops_table : TableListState < AsyncOpsTable , 9 > ,
24
+ pub async_ops_table : TableListState < AsyncOpsTable , 9 > ,
25
25
initial_render : bool ,
26
26
}
27
27
You can’t perform that action at this time.
0 commit comments