Skip to content

Commit a1c6f35

Browse files
committed
chore: cargo-rdme
1 parent 076c7fd commit a1c6f35

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

README.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,19 @@ pub struct Person {
3939
age: u32,
4040
}
4141

42-
fn main() {
43-
mount_to_body(|| {
44-
let rows = vec![
45-
Person { id: 1, name: "John".to_string(), age: 32 },
46-
Person { id: 2, name: "Jane".to_string(), age: 28 },
47-
Person { id: 3, name: "Bob".to_string(), age: 45 },
48-
];
49-
50-
view! {
51-
<table>
52-
<TableContent rows />
53-
</table>
54-
}
55-
});
42+
#[component]
43+
fn Demo() -> impl IntoView {
44+
let rows = vec![
45+
Person { id: 1, name: "John".to_string(), age: 32 },
46+
Person { id: 2, name: "Jane".to_string(), age: 28 },
47+
Person { id: 3, name: "Bob".to_string(), age: 45 },
48+
];
49+
50+
view! {
51+
<table>
52+
<TableContent rows scroll_container="html" />
53+
</table>
54+
}
5655
}
5756
```
5857

@@ -324,7 +323,7 @@ pub fn App() -> impl IntoView {
324323

325324
view! {
326325
<table>
327-
<TableContent rows on_change />
326+
<TableContent rows on_change scroll_container="html" />
328327
</table>
329328
}
330329
}

0 commit comments

Comments
 (0)