Conditional Rendering WORKS!

This commit is contained in:
2024-06-18 12:57:56 -05:00
parent 835271cd22
commit da84bdbb27
18 changed files with 194 additions and 140 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
use super::{BuilderFn, ControlBuilder, ControlData, ControlRenderData};
use crate::{form::FormToolData, form_builder::FormBuilder, styles::FormStyle};
use leptos::{Signal, View};
use std::ops::RangeInclusive;
use std::{ops::RangeInclusive, rc::Rc};
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct SliderData {
@@ -27,9 +27,9 @@ impl ControlData for SliderData {
fn build_control<FS: FormStyle>(
fs: &FS,
control: ControlRenderData<FS, Self>,
control: Rc<ControlRenderData<FS, Self>>,
value_getter: Signal<Self::ReturnType>,
value_setter: Box<dyn Fn(Self::ReturnType)>,
value_setter: Rc<dyn Fn(Self::ReturnType)>,
validation_state: Signal<Result<(), String>>,
) -> View {
fs.slider(control, value_getter, value_setter, validation_state)