fix: use signals for select dropdown data
This commit is contained in:
1 parent
bb5dfa2563
commit
f0f22bb68b
6 files changed
+17
-16
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user