mirror of
https://github.com/leptos-rs/leptos.git
synced 2025-12-28 07:52:34 -05:00
Compare commits
3 Commits
3509
...
transition
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d4cda02a3f | ||
|
|
1c413a4098 | ||
|
|
9f7c9da1a2 |
@@ -80,7 +80,7 @@ pub fn Stories() -> impl IntoView {
|
||||
<div>
|
||||
<Transition
|
||||
fallback=move || view! { <p>"Loading..."</p> }
|
||||
set_pending=set_pending.into()
|
||||
set_pending
|
||||
>
|
||||
{move || match stories.get() {
|
||||
None => None,
|
||||
|
||||
@@ -70,7 +70,7 @@ pub fn Stories() -> impl IntoView {
|
||||
>
|
||||
<a href=move || format!("/{}?page={}", story_type(), page() + 1)
|
||||
aria-label="Next Page"
|
||||
>
|
||||
>=
|
||||
"more >"
|
||||
</a>
|
||||
</span>
|
||||
@@ -79,7 +79,7 @@ pub fn Stories() -> impl IntoView {
|
||||
<div>
|
||||
<Transition
|
||||
fallback=move || view! { <p>"Loading..."</p> }
|
||||
set_pending=set_pending.into()
|
||||
set_pending
|
||||
>
|
||||
{move || match stories.get() {
|
||||
None => None,
|
||||
|
||||
@@ -91,7 +91,7 @@ pub fn Stories() -> impl IntoView {
|
||||
<div>
|
||||
<Transition
|
||||
fallback=|| ()
|
||||
set_pending=set_pending.into()
|
||||
set_pending
|
||||
>
|
||||
{move || stories.get().map(|story| story.map(|stories| view! {
|
||||
<ul>
|
||||
|
||||
@@ -39,7 +39,7 @@ use std::{
|
||||
/// <div>
|
||||
/// <Transition
|
||||
/// fallback=move || view! { <p>"Loading..."</p>}
|
||||
/// set_pending=set_pending.into()
|
||||
/// set_pending
|
||||
/// >
|
||||
/// {move || {
|
||||
/// cats.read().map(|data| match data {
|
||||
@@ -72,7 +72,7 @@ pub fn Transition<F, E>(
|
||||
/// A function that will be called when the component transitions into or out of
|
||||
/// the `pending` state, with its argument indicating whether it is pending (`true`)
|
||||
/// or not pending (`false`).
|
||||
#[prop(optional)]
|
||||
#[prop(optional, into)]
|
||||
set_pending: Option<SignalSetter<bool>>,
|
||||
/// Will be displayed once all resources have resolved.
|
||||
children: Box<dyn Fn() -> Fragment>,
|
||||
|
||||
Reference in New Issue
Block a user