File tree Expand file tree Collapse file tree 1 file changed +14
-15
lines changed
Expand file tree Collapse file tree 1 file changed +14
-15
lines changed Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments