summaryrefslogtreecommitdiff
path: root/src/viewmodel/name.rs
diff options
context:
space:
mode:
authorjelemux <jeremias.weber@protonmail.com>2021-02-05 18:05:16 +0100
committerjelemux <jeremias.weber@protonmail.com>2021-02-05 18:05:16 +0100
commitfd5b054fe655c81533c8a1138ba55a82a7b9d085 (patch)
tree2d90466a05356490ed3d15fa19e8dc0fe763499e /src/viewmodel/name.rs
parent87007b8785be959ca7687e2bec7401514e92581d (diff)
downloadwasm-card-fd5b054fe655c81533c8a1138ba55a82a7b9d085.tar.gz
wasm-card-fd5b054fe655c81533c8a1138ba55a82a7b9d085.tar.bz2
add date properties
Diffstat (limited to 'src/viewmodel/name.rs')
-rw-r--r--src/viewmodel/name.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/viewmodel/name.rs b/src/viewmodel/name.rs
index b6ded60..aa6747c 100644
--- a/src/viewmodel/name.rs
+++ b/src/viewmodel/name.rs
@@ -36,6 +36,7 @@ impl VCardPropertyInputObject<NameView> for Name {
}
}
fn get_input_fields(&self, link: &ComponentLink<NameView>) -> std::vec::Vec<VCardPropertyInputField> {
+ let typ = String::from("text");
vec![
VCardPropertyInputField::Text{
label: "Prefix".to_string(),
@@ -43,6 +44,7 @@ impl VCardPropertyInputObject<NameView> for Name {
placeholder: Some("Sir".to_string()),
oninput: link.callback(|e: InputData| Msg::UpdatePrefix(e.value)),
value: self.prefix.clone(),
+ typ: typ.clone(),
},
VCardPropertyInputField::Text{
label: "First Name".to_string(),
@@ -50,6 +52,7 @@ impl VCardPropertyInputObject<NameView> for Name {
placeholder: Some("Arthur".to_string()),
oninput: link.callback(|e: InputData| Msg::UpdateFirstName(e.value)),
value: self.first_name.clone(),
+ typ: typ.clone(),
},
VCardPropertyInputField::Text{
label: "Middle Name".to_string(),
@@ -57,6 +60,7 @@ impl VCardPropertyInputObject<NameView> for Name {
placeholder: Some("Charles".to_string()),
oninput: link.callback(|e: InputData| Msg::UpdateMiddleName(e.value)),
value: self.middle_name.clone(),
+ typ: typ.clone(),
},
VCardPropertyInputField::Text{
label: "Last Name".to_string(),
@@ -64,6 +68,7 @@ impl VCardPropertyInputObject<NameView> for Name {
placeholder: Some("Clarke".to_string()),
oninput: link.callback(|e: InputData| Msg::UpdateLastName(e.value)),
value: self.last_name.clone(),
+ typ: typ.clone(),
},
VCardPropertyInputField::Text{
label: "Suffix".to_string(),
@@ -71,6 +76,7 @@ impl VCardPropertyInputObject<NameView> for Name {
placeholder: Some("CBE FRAS".to_string()),
oninput: link.callback(|e: InputData| Msg::UpdateSuffix(e.value)),
value: self.suffix.clone(),
+ typ,
},
]
}