Fix issues with action integration with forms

This commit is contained in:
Greg Johnston 2022-11-05 22:47:33 -04:00
parent 35ca30fbab
commit aa3dd356c1
3 changed files with 7 additions and 11 deletions

View file

@ -1,6 +1,6 @@
[package]
name = "leptos"
version = "0.0.14"
version = "0.0.15"
edition = "2021"
authors = ["Greg Johnston"]
license = "MIT"
@ -13,7 +13,7 @@ leptos_core = { path = "../leptos_core", default-features = false, version = "0.
leptos_dom = { path = "../leptos_dom", default-features = false, version = "0.0.12" }
leptos_macro = { path = "../leptos_macro", default-features = false, version = "0.0.13" }
leptos_reactive = { path = "../leptos_reactive", default-features = false, version = "0.0.12" }
leptos_server = { path = "../leptos_server", default-features = false, version = "0.0.13" }
leptos_server = { path = "../leptos_server", default-features = false, version = "0.0.15" }
[features]
default = ["csr", "serde"]

View file

@ -1,6 +1,6 @@
[package]
name = "leptos_server"
version = "0.0.13"
version = "0.0.15"
edition = "2021"
authors = ["Greg Johnston"]
license = "MIT"

View file

@ -294,7 +294,7 @@ where
/// let pending = save_data.pending();
/// // how many times the action has run
/// // useful for reactively updating something else in response to a `dispatch` and response
/// let version = save_data.version();
/// let version = save_data.version;
///
/// // before we do anything
/// assert_eq!(input(), None); // no argument yet
@ -346,7 +346,8 @@ where
I: 'static,
O: 'static,
{
version: RwSignal<usize>,
/// How many times the action has successfully resolved.
pub version: RwSignal<usize>,
input: RwSignal<Option<I>>,
value: RwSignal<Option<O>>,
pending: RwSignal<bool>,
@ -394,11 +395,6 @@ where
self.value.read_only()
}
/// How many times the action has successfully resolved.
pub fn version(&self) -> ReadSignal<usize> {
self.version.read_only()
}
/// The URL associated with the action (typically as part of a server function.)
/// This enables integration with the `ActionForm` component in `leptos_router`.
pub fn url(&self) -> Option<&str> {
@ -442,7 +438,7 @@ where
/// let pending = save_data.pending();
/// // how many times the action has run
/// // useful for reactively updating something else in response to a `dispatch` and response
/// let version = save_data.version();
/// let version = save_data.version;
///
/// // before we do anything
/// assert_eq!(input(), None); // no argument yet