style: fix leptosfmt commands
This commit is contained in:
1 parent
0d4b769491
commit
1b6d7f21f7
1 file changed
+32
-23
+32
-23
@@ -158,18 +158,20 @@ pub fn HomePage() -> impl IntoView {
|
||||
// Replace this fallback with a real loading screen.
|
||||
<Suspense fallback=Loading>
|
||||
{move || {
|
||||
server_resource.get().map(|submission: StudentInfo| {
|
||||
server_resource
|
||||
.get()
|
||||
.map(|submission: StudentInfo| {
|
||||
let reactive_info = StudentInfoReactive::new(submission);
|
||||
|
||||
let select_value = RwSignal::new(String::from("Math"));
|
||||
let chk_select = RwSignal::new(vec!["Testing 2".into()]);
|
||||
|
||||
let elements_disabled = RwSignal::new(false);
|
||||
|
||||
view! {
|
||||
<div class="flex flex-row">
|
||||
<Panel>
|
||||
<p>"Testing paragraph! This panel should be the same size as the other."</p>
|
||||
<p>
|
||||
"Testing paragraph! This panel should be the same size as the other."
|
||||
</p>
|
||||
</Panel>
|
||||
<Panel>
|
||||
<Row>
|
||||
@@ -183,43 +185,50 @@ pub fn HomePage() -> impl IntoView {
|
||||
label="First Name:"
|
||||
placeholder="John"
|
||||
disabled=elements_disabled
|
||||
value=reactive_info.first_name />
|
||||
value=reactive_info.first_name
|
||||
/>
|
||||
<OutlinedTextField
|
||||
label="Last Name:"
|
||||
placeholder="Smith"
|
||||
disabled=elements_disabled
|
||||
value=reactive_info.last_name />
|
||||
value=reactive_info.last_name
|
||||
/>
|
||||
<OutlinedTextField
|
||||
label="Contact Email"
|
||||
placeholder="temp@region15.org"
|
||||
disabled=elements_disabled
|
||||
value=reactive_info.student_email />
|
||||
value=reactive_info.student_email
|
||||
/>
|
||||
</Row>
|
||||
<Row>
|
||||
<Select
|
||||
value_list = vec!["Math", "English", "Science"]
|
||||
.into_iter().map(|s| s.into()).collect()
|
||||
value = select_value
|
||||
value_list=vec!["Math", "English", "Science"]
|
||||
.into_iter()
|
||||
.map(|s| s.into())
|
||||
.collect()
|
||||
value=select_value
|
||||
disabled=elements_disabled
|
||||
/>
|
||||
<CheckboxList
|
||||
selected = chk_select
|
||||
items = vec!["Testing 1", "Testing 2"]
|
||||
.into_iter().map(|s| s.into()).collect()
|
||||
disabled=elements_disabled />
|
||||
selected=chk_select
|
||||
items=vec!["Testing 1", "Testing 2"]
|
||||
.into_iter()
|
||||
.map(|s| s.into())
|
||||
.collect()
|
||||
disabled=elements_disabled
|
||||
/>
|
||||
</Row>
|
||||
<Row>
|
||||
<ActionButton
|
||||
on:click=move |_| {
|
||||
console_log(format!("Found value {:?}", chk_select.get()).as_str());
|
||||
submit_action.dispatch(CreateSampleSubmission {
|
||||
<ActionButton on:click=move |_| {
|
||||
console_log(
|
||||
format!("Found value {:?}", chk_select.get()).as_str(),
|
||||
);
|
||||
submit_action
|
||||
.dispatch(CreateSampleSubmission {
|
||||
student_info: reactive_info.capture(),
|
||||
subject: user_claims.get().unwrap().claims.subject.clone()
|
||||
subject: user_claims.get().unwrap().claims.subject.clone(),
|
||||
});
|
||||
}
|
||||
>
|
||||
"Submit"
|
||||
</ActionButton>
|
||||
}>"Submit"</ActionButton>
|
||||
</Row>
|
||||
</Panel>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user