leptos_struct_table/components/
cell.rs1#![allow(unused_variables)]
2
3use crate::CellValue;
4use std::marker::PhantomData;
5
6use leptos::prelude::*;
7
8#[component]
10pub fn DefaultTableCellRenderer<Row, T, M>(
11 class: String,
13 value: Signal<T>,
15 row: RwSignal<Row>,
17 index: usize,
19 options: T::RenderOptions,
20 #[prop(optional)] _marker: PhantomData<M>,
21) -> impl IntoView
22where
23 Row: Send + Sync + 'static,
24 T: CellValue<M> + Send + Sync + Clone + 'static,
25 M: 'static,
26{
27 view! {
28 <td class=class>{move || value.get().render_value(options.clone())}</td>
29 }
30}