antizer.reagent
create-form
(create-form form & {:keys [options props], :or {options {}, props {}}})
Calls Form.create() decorator with the form to be created. form can be any hiccup form. Accepts the following options:
- :options - map of Form.create() options. Refer to: https://ant.design/components/form/#Form.create(options) for details
- :props - the properties hashmap to be passed to the component. Note that the received properties will be in the form of a JavaScript associative map
decorate-field
(decorate-field form id field)
(decorate-field form id options field)
Decorate a form field, corresponds to antd’s getFieldDecorator() function Arguments:
- form - the
form
object, obtained from(get-form)
- id - field identifier, supports nested fields format in string format
- options - the validation options for the field
- field - the input field element that the validation will be applied to
For more information about the validation options, please refer to: https://ant.design/components/form/#getFieldDecorator(id,-options)-parameters
get-form
(get-form)
Returns the form
created by Form.create(). This function must be called from within the form
component