File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ pub fn component() -> impl IntoView {
49
49
)
50
50
. child (
51
51
div ( )
52
- . child ( query_editor:: component ( tabs. selected_tab . get ( ) ) )
52
+ . child ( query_editor:: component ( move || tabs. selected_tab . get ( ) ) )
53
53
. child ( query_table:: component ( ) ) ,
54
54
) ,
55
55
)
Original file line number Diff line number Diff line change @@ -15,8 +15,10 @@ use crate::{
15
15
16
16
pub type ModelCell = Rc < RefCell < Option < CodeEditor > > > ;
17
17
18
- pub fn component ( index : usize ) -> impl IntoView {
19
- logging:: log!( "{:?}" , index) ;
18
+ pub fn component < F > ( index : F ) -> impl IntoView
19
+ where
20
+ F : Fn ( ) -> usize ,
21
+ {
20
22
let query_store = use_context :: < QueryStore > ( ) . unwrap ( ) ;
21
23
let run_query = create_action ( move |query_store : & QueryStore | {
22
24
let query_store = * query_store;
Original file line number Diff line number Diff line change @@ -32,8 +32,9 @@ impl EditorStore {
32
32
33
33
pub fn get_active_editor ( & self ) -> RwSignal < ModelCell > {
34
34
let selected_tab = use_context :: < Tabs > ( ) . unwrap ( ) . selected_tab . get_untracked ( ) ;
35
+ logging:: log!( "{:?}" , selected_tab) ;
35
36
36
- self . editors [ selected_tab] . clone ( )
37
+ self . editors [ selected_tab]
37
38
}
38
39
39
40
pub fn get_editor_value ( & self ) -> String {
You can’t perform that action at this time.
0 commit comments