All notable changes to this project will be documented in this file.
- swap order when merging user provided fork state with the internal one. This allows the
:values
and:touched
keys to remain unchanged when the code hot reloads
- store initial-values and initial-touched in state so they can be modified after first mount
- set-handle-change takes a vector of maps vs one map
- Add support for fieldarray drag and drop (only top level fieldarrays)
- Add support for nested field arrays
- Add :fieldarray/touched handler
- Fixed a bug involving touched fn introduced in 2.2.7
- Remove keywordization logic on init values
state
to main props to allow users to pass their own ratoms
dirty
to main props
fork/field-array
,set-handle-change
,set-handle-blur
path
option takes a vector of keys or a single key identifier for backward compatibility
path
option now takes a vector of keys
normalize-name
prop to support namespaced keywords
successful-submissions
value to props.
submit-count
intoattempted-submissions
.
keywordize-keys
config param. It casts all strings to keywords, allowing the developer to only deal with keywords across the form components and handlers.
send-server-request
only takes two params. The first one is a map that must contain a:name
key along with optional:value
,:evt
,:debounce
,:throttle
keys. The the second one is the user provided fn for the server http request.
errors
,dirty
, andtouched
arguments to thesend-server-request
user provided function.
- to use Fork now you need to require either
fork.re-frame
orfork.reagent
. For the bulma UI kit requirefork.bulma
:on-submit-response
map has been removed. It's better to delegate the server for the error messages:on-submit-response-message
has changed into:on-submit-server-message
:set-status-code
has changed into:set-server-message
:set-waiting
,:set-submitting
, and:set-server-message
are now globally accessible from yourfork.re-frame
orfork.reagent
namespaces.- the re-frame interceptors
:on-submit
and:clean
have been removed. Therefore, now you need to set submitting? to true yourself (through the global helper).
dirty?
submit handler intodirty
. Now, the variable returns eithernil
or a map of changed values.
reset
handler to props
:throttle
option toon-submit-response
on-submit-response
handlerset-status-code
re-frame handler
- set-external-errors
component-did-mount
handlerinitial-touched
handler
set-touched
args should not be wrapped in a sequence.
- enable disable re-frame handlers
send-server-request
handler
- Support for any side effect free validation
:external-errors
key to differenciate from input:errors
:form-id
to let fork know about the inputs
:initial-values
not required- Safe calls to
(values "input")
or(touched "input")
when no value is set
- Built-in validation
- Array input support
- Dynamic array input and more built-in inputs