(attr-facet-sub facet)(clear-form db partial-form-path)(form-signal [_ partial-form-path])(initialize-form db [partial-form-path {:keys [buffer] :as form}])(set-attr-facet db [partial-form-path attr-path facet val])(submit-form full-form-path
data
{:keys [success error]
:or {success :sweet-tooth.frontend.form.flow/submit-form-success
error :sweet-tooth.frontend.form.flow/submit-form-error}
:as form-spec})Returns a request that the sync handler can use
success and error are the handlers for request completion.form-spec is a way to pass on whatevs data to the request
completion handler.:request-opts key of form spec can customize the ajax requestReturns a request that the sync handler can use - `success` and `error` are the handlers for request completion. - `form-spec` is a way to pass on whatevs data to the request completion handler. - the `:request-opts` key of form spec can customize the ajax request
(submit-form-error db [errors full-form-path form-spec])(success-base db-update)Produces a function that can be used for handling form submission success. It handles the common behaviors:
:response key with the returned datacallback in form-spec:clear in form-specYou customize success-base by providing a db-update function which
will e.g. merge or deep-merge values from the response.
TODO investigate useing the after interceptor
Produces a function that can be used for handling form submission success. It handles the common behaviors: - updating the form state to :success - populating the form's `:response` key with the returned data - calls callback specified by `callback` in `form-spec` - clears form keys specified by `:clear` in `form-spec` You customize success-base by providing a `db-update` function which will e.g. `merge` or `deep-merge` values from the response. TODO investigate useing the `after` interceptor
Customize url prefix, e.g. "/api/v1"
Customize url prefix, e.g. "/api/v1"
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |