Commit Graph

332 Commits

Author SHA1 Message Date
Vsevolod Ivanov db6e68ad4c fix resetmodel binding 2017-10-21 21:44:01 -07:00
Vsevolod Ivanov c7926cf355 Update package.json 2017-09-28 01:10:46 +03:00
Aesop Wolf 42e39cbc8f Chore/tweaks for v1 (#473)
* Rename HOC/Wrapper export to `withFormsy`

This is more in alignment with community practices.

* Migrate from npm to yarn

* Update package.json

Use order listed on https://yarnpkg.com/en/docs/package-json

* Update README.md

New examples, and small copy/whitespace changes

* Remove CHANGES.md

We will use github release from now on

* Fix test suite

Replace all references to  with

* Add ESLint

* Update dependencies

* Upgrade babel dependencies

* Upgrade jsdom

* Upgrade nodeunit and sinon

* Upgrade webpack and webpack-dev-server

* Fix examples

* Convert to ES6 classes

* Fix ESLint errors and warnings (WIP)

* Fix more ESLint errors and warnings (WIP)

* Move runRules to utils.js

* Fix more ESLint errors and warnings (WIP)

* Fix more ESLint errors and warnings (WIP)

* Fix more ESLint errors and warnings (WIP)

* Use less complex regex's for url and email

* Change grammar in README

* Change export pattern

* Use ES6 export for utils and validationRules

* Fix login example

* Reorder methods alphabetically and remove "magical" `validate` feature

* Remove `validate` from API docs (and general cleanup of file)

* Update examples (removes `validate` feature)

* Rename webpack file and remove json loader

* Fix code samples in README

* Update reset-values example (WIP)

* Cleanup reset-values example

* Fix prop type for Wrapper value

* Handle onReset event

* Update reset-value example to support `<button type="reset">`

* Update dynamic form fields example
2017-08-29 16:35:17 -07:00
Tom B b413f9db77 A few changes to API for better Wrapped component support (#472)
* Add propTypes to API docs; move innerRef doc to match location in table of contents

* Change HOC to Wrapper (be consistent everywhere)

* Inject defaultProps.value from wrapped component into Formsy.Wrapper

This way users can provide a default value for their form field.
Previously, this was possible because mixins were on the same level as the actual component.

* Add optional parameter to setState to disable validation

* Update prepublish script to clean `lib`; rebuild release folder
2017-08-11 11:53:00 -07:00
Aesop Wolf 998e2be44f Update package.json version to 1.0.0 2017-08-08 22:14:00 -07:00
Tom B 98525a4b64 Major update/cleanup to Formsy API; React v15+; No more mixins (#470)
* Up node to 8.2.1; only allow React v15+

* Update HOC to ES6 component; kill Mixin and decorator

* Update all tests; ES6ify everything!

* Update examples to ES6 classes

* Update API docs

* Fix broken/commented test case

* Move peer dep to regular dep since peer is deprecated
2017-08-08 22:09:11 -07:00
Aesop Wolf ebd84bb026 Fix warning about isMounted being deprecated 2017-06-17 19:30:05 -07:00
Aesop Wolf 7dc68fc633 Migrate from React.createClass to create-react-class 2017-06-16 14:28:30 -07:00
Aesop Wolf a20da5b7cd Migrate from React.PropTypes to prop-types 2017-06-15 20:10:13 -07:00
Aesop Wolf c5dfa4b31a v0.19.2 2017-01-23 19:18:56 -08:00
Aesop Wolf f1ba9d417e Revert "fix: show the default validation message when there is a required error (#386)"
This reverts commit ac301f8950.
2017-01-23 19:13:05 -08:00
Aesop Wolf 57f97cb045 v0.19.1 2017-01-18 13:32:55 -08:00
CT Wu ac301f8950 fix: show the default validation message when there is a required error (#386)
* Show the default validation error message when required is invalid

* Fix showError
2017-01-18 13:31:02 -08:00
Tim Brayshaw d68586180a Remove stray sentence. (#415) 2017-01-12 09:37:57 -08:00
Aesop Wolf f395839e2c Update API.md
Add note about xregexp
2016-12-29 15:11:36 -08:00
David Blurton 73dd46b5e3 Fix crash when comparing array with null (#404) 2016-12-10 09:20:21 -08:00
Scott Silvi 84cdcb117c docs: Removing unnecessary single quote (#410) 2016-12-08 22:51:17 -08:00
Aesop Wolf c56e8c3328 0.19.0 2016-12-08 22:34:08 -08:00
Aesop Wolf 2b249113d8 feat: expose inner element when using HOC (#399)
Use `innerRef={(c) => { this.myInput = c; }}` on your HOC to access the internal element
2016-12-08 22:24:19 -08:00
Christian Alfoni 15493dce67 Update README.md 2016-10-05 16:04:08 +02:00
Christian Alfoni 89dbed0468 Update LICENSE 2016-10-05 14:46:46 +02:00
Dmitry Semigradsky 168521e578 Merge pull request #366 from maniart/patch-2
Nit-picky typo
2016-07-21 17:57:27 +03:00
Mani Nilchiani 42ba9616d2 Nit-picky typo
This is some *great* documentation work. I read it so carefully that this nit-picky typo came to my attention.
2016-07-13 12:57:29 -04:00
Semigradsky 6b167cbfe1 0.18.1 2016-07-05 11:52:41 +03:00
Semigradsky 24a6b6217d Fixed #335: getErrorMessages is undocumented in API 2016-07-05 11:49:29 +03:00
Semigradsky d6950885a1 Fixed #298: RangeError: Maximum call stack size exceeded with custom validator 2016-07-05 11:36:06 +03:00
Semigradsky 3cdcdf57ce Fixed uncontrollable/controllable components in examples 2016-07-05 11:22:25 +03:00
Semigradsky 1800442ea1 Fixed #361: Unknown props `onValidSubmit`, `onSubmitted` on <form> tag 2016-07-05 10:54:18 +03:00
Dmitry Semigradsky da8f041eca Merge pull request #357 from wizardzloy/patch-1
Use better displayNames for components wrapped into HOC
2016-07-05 10:41:16 +03:00
Vladimir Guguiev 9e923dd0dc Use better names for components wrapped into HOC
Currently the `displayName` of the component wrapped into HOC looks like `Constructor`, which isn't very descriptive.
This PR introduces a better `displayName` for such components: `Formsy(ComponentName)`
2016-06-11 13:21:44 +02:00
Semigradsky 89a2d4287b Update documentation 2016-04-21 13:16:00 +03:00
Semigradsky 6767a6b9eb Fix: Cannot reset value unless truthy 2016-04-21 13:05:47 +03:00
Semigradsky d84397906b 0.18.0 2016-04-19 11:12:31 +03:00
Semigradsky 112819f699 Update dependencies. Some minor changes. 2016-04-19 11:12:14 +03:00
Dmitry Semigradsky 4931256105 Fix link 2015-12-12 16:19:38 +03:00
Dmitry Semigradsky 7658d06cc8 Merge pull request #258 from sdemjanenko/fix_multiple_on_change
Fix multiple on change
2015-12-10 21:23:05 +03:00
Stephen Demjanenko 1df3e3520f Formsy.Form: omit Formsy-only props from the `<form/>` component 2015-12-10 09:38:01 -08:00
Stephen Demjanenko fec4576d1b FormsySpec: test that `onChange` is called only once 2015-12-10 09:37:57 -08:00
Dmitry Semigradsky b39fd2ed74 Fix link 2015-12-10 09:22:53 +03:00
Semigradsky 18467a94a1 Added `updateInputsWithError` to documentation. 2015-12-10 09:21:53 +03:00
Semigradsky d5268a4eef Added mapping to `getModel()` 2015-12-08 13:10:48 +03:00
Semigradsky 5b5bd0fb67 Add `getModel()` to documentation. 2015-12-08 12:00:49 +03:00
Dmitry Semigradsky 46c1f2c250 Merge pull request #275 from christianalfoni/issue-267
Issue 267
2015-12-08 11:39:23 +03:00
Semigradsky dcac495d79 Renamed `this.updateModel` to `this.getModel` 2015-12-07 13:56:47 +03:00
Semigradsky c4fa202ebf Fix `component[Will|Did]Update` behavior. Build release. 2015-12-02 16:50:06 +03:00
Semigradsky 7481b6da64 Fix #267 2015-12-02 16:39:39 +03:00
Semigradsky fbd09119d3 Added `dynamic form fields` example. 2015-12-01 17:00:43 +03:00
Dmitry Semigradsky f67f8317c9 Merge pull request #252 from neoziro/patch-2
Prevent multiple rendering with PureRenderMixin
2015-11-05 13:43:10 +03:00
Semigradsky 59bde8324c Added test for rendering elements with PureRenderMixin and Formsy.Mixin 2015-11-05 13:41:48 +03:00
Dmitry Semigradsky 8636cdabc3 Added link to codepen demo. 2015-11-03 15:02:53 +03:00