1- use leptos:: html:: AnyElement ;
21use leptos:: prelude:: * ;
3- use leptos:: svg :: G ;
2+ use leptos:: web_sys ;
43use leptos_struct_table:: * ;
54
65const ROW_HEIGHT : usize = 30 ;
@@ -14,14 +13,11 @@ wrapper_render_fn!(
1413
1514#[ allow( non_snake_case) ]
1615pub fn SvgTbodyRenderer (
17- content : Fragment ,
16+ content : impl IntoView ,
1817 class : Signal < String > ,
19- node_ref : NodeRef < AnyElement > ,
18+ body_ref : BodyRef ,
2019) -> impl IntoView {
21- let tbody_ref = create_node_ref :: < G > ( ) ;
22- tbody_ref. on_load ( move |e| node_ref. load ( & e. into_any ( ) ) ) ;
23-
24- view ! { <g class=class node_ref=tbody_ref>{ content} </g> }
20+ view ! { <g class=class use : body_ref>{ content} </g> }
2521}
2622
2723#[ allow( unused_variables, non_snake_case) ]
@@ -78,16 +74,16 @@ pub fn SvgErrorRowRenderer(err: String, index: usize, _col_count: usize) -> impl
7874#[ allow( non_snake_case, unstable_name_collisions) ]
7975pub fn SvgLoadingRowRenderer (
8076 class : Signal < String > ,
81- _get_cell_class : Callback < usize , String > ,
82- get_inner_cell_class : Callback < usize , String > ,
77+ _get_cell_class : Callback < ( usize , ) , String > ,
78+ get_inner_cell_class : Callback < ( usize , ) , String > ,
8379 index : usize ,
8480 _col_count : usize ,
8581) -> impl IntoView {
8682 let transform = y_transform_from_index ( index) ;
8783
8884 view ! {
8985 <g class=class transform=transform>
90- <text x="0" y=ROW_HEIGHT_HALF class=get_inner_cell_class. call ( 0 ) dominant-baseline="central" >
86+ <text x="0" y=ROW_HEIGHT_HALF class=get_inner_cell_class. run ( ( 0 , ) ) dominant-baseline="central" >
9187 Loading ...
9288 </text>
9389 </g>
@@ -143,12 +139,12 @@ where
143139#[ allow( unused_variables) ]
144140pub fn SvgTextCellRenderer < T , F > (
145141 class : String ,
146- #[ prop( into) ] value : MaybeSignal < T > ,
142+ #[ prop( into) ] value : Signal < T > ,
147143 on_change : F ,
148144 index : usize ,
149145) -> impl IntoView
150146where
151- T : IntoView + Clone + ' static ,
147+ T : IntoView + Clone + Send + Sync + ' static ,
152148 F : Fn ( T ) + ' static ,
153149{
154150 let x = x_from_index ( index) ;
@@ -164,7 +160,7 @@ where
164160#[ allow( unused_variables) ]
165161pub fn SvgPathCellRenderer < F > (
166162 #[ prop( into) ] class : String ,
167- #[ prop( into) ] value : MaybeSignal < String > ,
163+ #[ prop( into) ] value : Signal < String > ,
168164 on_change : F ,
169165 index : usize ,
170166) -> impl IntoView
0 commit comments