fix: use signals for select dropdown data

This commit is contained in:
alphafetus committed 2026-02-02 14:07:15 -05:00
1 parent bb5dfa2563
commit f0f22bb68b
6 files changed
+17 -16

No files matched your search

+2 -1
View File
@@ -20,7 +20,7 @@ fn validate(required: bool, value: String) -> ValidationState {
/// by the `value` prop of the component.
#[component]
pub fn Select(
#[prop()] value_list: Vec<String>,
#[prop(into)] value_list: Signal<Vec<String>>,
#[prop(into)] data_member: Signal<String>,
#[prop()] data_map: RwSignal<HashMap<String, ValueType>>,
#[prop(optional, into)] label: String,
@@ -110,6 +110,7 @@ pub fn Select(
</option>
{move || {
value_list
.get()
.iter()
.map(move |value| {
let display = value.to_owned();