diff --git a/Cargo.toml b/Cargo.toml index 9897738..dc19021 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "leptos-struct-table-macro" -version = "0.13.0" +version = "0.13.0-beta1" edition = "2021" authors = ["Marc-Stefan Cassola"] description = "Macros for the leptos-struct-table crate." diff --git a/src/table_row.rs b/src/table_row.rs index d9f5ee2..9e33d20 100644 --- a/src/table_row.rs +++ b/src/table_row.rs @@ -76,7 +76,7 @@ fn get_default_option_renderer( return match get_inner_type(last_segment, "Option") { Ok(inner_type_ident) => { let value_prop = quote! { - value=Signal::derive(move || value.get().expect("Just checked above that it's not None")) + value=leptos::prelude::Signal::derive(move || value.get().expect("Just checked above that it's not None")) }; let none_value = field.none_value.clone().unwrap_or_default(); @@ -91,9 +91,11 @@ fn get_default_option_renderer( quote! { { - let value = Signal::derive(move || { row.read().#getter }); + use leptos::prelude::Read; + + let value = leptos::prelude::Signal::derive(move || { row.read().#getter }); - leptos::view! { + leptos::prelude::view! { - value=Signal::stored(#none_value.to_string()) + value=leptos::prelude::Signal::stored(#none_value.to_string()) options={()} #class_prop #index_prop row=row /> @@ -245,7 +247,13 @@ fn get_renderer_for_field(name: &Ident, field: &TableRowField, index: usize) -> let class = field.cell_class(); let class_prop = quote! { class=class_provider.cell( # class) }; - let value_prop = quote! { value={ Signal::derive(move || row.read().#getter) } }; + let value_prop = quote! { + value={ + use leptos::prelude::Read; + + leptos::prelude::Signal::derive(move || row.read().#getter) + } + }; if let Some(renderer) = &field.renderer { let ident = renderer.as_ident();