Liking cljdoc? Tell your friends :D

sweet-tooth.frontend.form.flow


attr-facet-subclj/s

(attr-facet-sub facet)

clear-formclj/s

(clear-form db partial-form-path)

form-signalclj/s

(form-signal [_ partial-form-path])

form-statesclj/s


initialize-formclj/s

(initialize-form db [partial-form-path {:keys [buffer] :as form}])

set-attr-facetclj/s

(set-attr-facet db [partial-form-path attr-path facet val])

submit-formclj/s

(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.
  • the :request-opts key of form spec can customize the ajax request
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.
- the `:request-opts` key of form spec can customize the ajax request
raw docstring

submit-form-errorclj/s

(submit-form-error db [errors full-form-path form-spec])

submit-form-successclj/s


success-baseclj/s

(success-base db-update)

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

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
raw docstring

url-prefixclj/smultimethod

Customize url prefix, e.g. "/api/v1"

Customize url prefix, e.g. "/api/v1"
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close