Skip to content

Releases: twisty/formsy-react-components

v1.0.0-alpha.2

11 Aug 17:57
Compare
Choose a tag to compare
v1.0.0-alpha.2 Pre-release
Pre-release

Components are now named exports, restoring the interface from 0.x releases. For example:

import { Textarea } from 'formsy-react-components';

Install

npm install formsy-react-components@next

v1.0.0-alpha.1

19 Jun 22:33
Compare
Choose a tag to compare
v1.0.0-alpha.1 Pre-release
Pre-release

For breaking changes see migrating-to-1.0.0.

Install

npm install formsy-react-components@next

v0.10.1

19 Jan 10:47
Compare
Choose a tag to compare
  • Fix for #94: Unknown prop layout on <form> tag.

v0.10.0

18 Jan 23:21
Compare
Choose a tag to compare
  • Add new validateOnSubmit prop. Thanks to @almassapargali for contributing this.
  • Fix for #93: 'Type is invalid when creating a Form'

validateOnSubmit prop.

When true, validation notices are hidden until the user attempts to submit the form. This prop can be passed to individual components, or set for all components in the form via the parentContext mixin.

v0.9.0

13 Dec 12:25
Compare
Choose a tag to compare
  • Add a <Form> wrapper as a convenience. Thanks @Mokto
  • Bumped formsy-react dependency so we can install 0.19.x releases.

v0.8.1

08 Jul 14:40
Compare
Choose a tag to compare
  • Fix 'Unknown Prop' warnings in react 15.2.

v0.8.0

18 Jun 23:58
Compare
Choose a tag to compare
  • Support for <optgroup> in <Select /> component (@Reltik)
  • Replaced old-style string refs with new-style callback refs (@shilman, @SachaG)

<optgroup> in the <Select /> Component

See the test file for details.

Component Refs

Refs to the form controls are now generated via callbacks. See The ref String Attribute for more details.

Breaking change: targeting the component's form control via the refs key no longer works. You will need to update your code:

// old
myComponent.refs.element

// new
myComponent.element
  • For components that wrap a single element (<Input />, <Select />, <Textarea /> etc.) the ref is named "element".
  • For components that wrap multiple form elements (<CheckboxGroup />, <RadioGroup />) each form control has a ref named "element-" and then the name of the key for that element, e.g. element-foo.

v0.7.1

18 Apr 19:23
Compare
Choose a tag to compare

Fix package.json so that it's possible to install React v15 when using this package (#63).

v0.7.0

01 Apr 14:48
Compare
Choose a tag to compare
  • Added ref to form elements. (b5566af)
  • The asterisk symbol for "required" is now targetable via CSS. (28c049b)
    • The symbol is now wrapped in a span: <span class="required-symbol"> *</span>
  • Add data-required html attribute to the label tag to make it targetable via CSS. (c101bce)
  • Use the React convention of returning null for things that we don't want rendering.
    • Warning: Previously we were returning an empty string that caused a few empty <span /> elements to be peppered about. While unlikely, this may break your layout if you have CSS that depends on these empty <span />s being present (like :nth-child selectors).

Thanks to everyone that has took the time to file issues and provide feedback.


Component Refs

Each component has a ref to it's form control elements.

  • For components that wrap a single element (<Input />, <Select />, <Textarea /> etc.) the ref is named "element".
  • For components that wrap multiple form elements (<CheckboxGroup />, <RadioGroup />) the each form control has a ref named "element-" and then the name of the key for that element, e.g. element-foo.

Warning: Previously, the refs to form elements in the <CheckboxGroup /> were not prefixed with element-, if you have code used these refs, you'll need to update it.

v0.6.6

23 Feb 10:50
Compare
Choose a tag to compare

• Fix for #45 — Hidden input elements fail to render.