antizer.rum
adapt-class
(adapt-class react-class & args)
create-form
(create-form form & {:keys [options props], :or {options {}, props {}}})
Calls Form.create() wrapper with the form to be created. form
should be a (rum.core/defcs)
component. 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 during the
:init
stage. 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 form field, corresponds to antd’s getFieldDecorator() function
- 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 state)
Returns the form
created by Form.create(). This function must be called from within the (rum.core/defcs)
component, while passing in the component’s state