Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow default values for absent 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(is_good: bool) -> Result<(), ServerFnError> {} Arguments absent in the request to the server API will use the Default::default() constructor.
- Loading branch information