Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support default values for annotated server_fn arguments
This allows form submission with checkbox inputs to work. For example: let doit = create_server_action::<DoItSFn>(); <ActionForm action=doit> <input type="checkbox" name="is_good" value="true"/> <input type="submit"/> </ActionForm> #[server(DoItSFn, "/api")] pub async fn doit(#[server(default)] is_good: bool) -> Result<(), ServerFnError> {} If is_good is absent in the request to the server API, `Default::default()` is used instead.
- Loading branch information