fix: allow uniquely named lists to work with multientry component

This commit is contained in:
alphafetus committed 2026-02-04 22:01:44 -05:00
1 parent 4bf0cdcb39
commit 956c653e28
4 files changed
+31 -10

No files matched your search

+5 -1
View File
@@ -103,6 +103,10 @@ pub fn Checkbox(
/// ```
#[component]
pub fn CheckboxList(
/// The name that this list should use. This doesn't need to be specified all the time, but is
/// for use in elements that may treat this list as a sub-input (components like the [`MultiEntry`]
/// do this)
#[prop(optional, into)] name: Signal<String>,
/// The data member that this list should edit/display from the `data_map`.
#[prop(into)] data_member: Signal<String>,
/// A [`Signal`] allowing access to a data store.
@@ -160,7 +164,7 @@ pub fn CheckboxList(
on_change=on_change
// The actual selected values are tracked by this element, not by the checkboxes themselves.
value=item
name=data_member
name=move || format!("{}_{}", name.get(), data_member.get())
disabled=disabled
/>
}