Releases: kjanoudi/joiful-react-forms
Releases · kjanoudi/joiful-react-forms
0.2.2
v0.1.4
bug fixes and unit tests
Inline custom components
<JoifulInput
is={CustomElement}
name="my-input"
/>Custom JoifulInput components can now be defined in application context + bug fix
Example of defining custom JoifulInput types once in application context:
static childContextTypes = {
joifulReactForms: PropTypes.object
};
getChildContext() {
return {
joifulReactForms: {
JoifulInput: {
types: {
text: ...,
select: ...,
dateTime: ...,
...
}
}
}
}
}Note: you can override at an instance level using the elementType prop on <JoifulForm>
Documentation
Merge pull request #10 from kjanoudi/1 Readme updates + version bump
README & Shiny new top-level API
- Top Level API
{ JoifulForm, JoifulInput }
- JoifulForm
customInputElementTypesreplaced withelementTypes- Removed the 'Element' part of the api for this property to this
elementTypes={ text, select, textarea, myCustomInput } - Component declaration for the elementTypes was once a function. It expects a react component now, so overriding is intuitive.
- JoifulInput
fieldNamereplaced withnameinputPropsprops have been flattenedisis now shorthand forelementType
- Eslint