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 {
4949 )
5050 . child (
5151 div ( )
52- . child ( query_editor:: component ( tabs. selected_tab . get ( ) ) )
52+ . child ( query_editor:: component ( move || tabs. selected_tab . get ( ) ) )
5353 . child ( query_table:: component ( ) ) ,
5454 ) ,
5555 )
Original file line number Diff line number Diff line change @@ -15,8 +15,10 @@ use crate::{
1515
1616pub type ModelCell = Rc < RefCell < Option < CodeEditor > > > ;
1717
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+ {
2022 let query_store = use_context :: < QueryStore > ( ) . unwrap ( ) ;
2123 let run_query = create_action ( move |query_store : & QueryStore | {
2224 let query_store = * query_store;
Original file line number Diff line number Diff line change @@ -32,8 +32,9 @@ impl EditorStore {
3232
3333 pub fn get_active_editor ( & self ) -> RwSignal < ModelCell > {
3434 let selected_tab = use_context :: < Tabs > ( ) . unwrap ( ) . selected_tab . get_untracked ( ) ;
35+ logging:: log!( "{:?}" , selected_tab) ;
3536
36- self . editors [ selected_tab] . clone ( )
37+ self . editors [ selected_tab]
3738 }
3839
3940 pub fn get_editor_value ( & self ) -> String {
You can’t perform that action at this time.
0 commit comments