Closed kandrelczyk closed 1 month ago
Hi,
I'm trying to do something like that:
let error : RwSignal<Option<SomeError>> = create_rw_signal(None); let show_error = Signal::derive(move||error.get().is_some()); <Modal title="title" show=show_error> { display error} </Modal>
This didn't work because show has type Model and you can't create Model from derived signal.
show
I've added the From<Signal<T>> for Model<T> implementation and it's working now.
From<Signal<T>> for Model<T>
Is this a good approach? I think especially for components like Modal handling derived signal is very useful but maybe there's better way to do it.
Closing since it's not needed.
Hi,
I'm trying to do something like that:
This didn't work because and you can't create Model from derived signal.
show
has type ModelI've added the
From<Signal<T>> for Model<T>
implementation and it's working now.Is this a good approach? I think especially for components like Modal handling derived signal is very useful but maybe there's better way to do it.