Skip to content

Commit

Permalink
- prevent option.msgOnError being cached.
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardxiao committed May 19, 2020
1 parent 6d2b13c commit da438fa
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lib/components/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/react-inputs-validation.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/react-inputs-validation.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/react-inputs-validation.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/react-inputs-validation.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-inputs-validation",
"version": "4.4.1",
"version": "4.4.2",
"description": "A react component for form inputs validation.",
"main": "index.js",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/js/Inputs/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ const component: React.FC<Props> = ({
setErr(err);
setMsg(msg);
validationCallback && validationCallback(err);
}, []);
}, [option.msgOnError]);
useEffect(
() => {
if (validate) {
Expand Down
2 changes: 1 addition & 1 deletion src/js/Inputs/Radiobox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ const component: React.FC<Props> = ({
setErr(err);
setMsg(msg);
validationCallback && validationCallback(err);
}, []);
}, [option.msgOnError]);
useEffect(
() => {
if (validate) {
Expand Down
2 changes: 1 addition & 1 deletion src/js/Inputs/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ const component: React.FC<Props> = ({
setErr(err);
setMsg(msg);
validationCallback && validationCallback(err);
}, []);
}, [option.msgOnError]);
/* istanbul ignore next because of https://github.com/airbnb/enzyme/issues/441 && https://github.com/airbnb/enzyme/blob/master/docs/future.md */
useEffect(() => {
if (typeof window !== 'undefined') {
Expand Down
2 changes: 1 addition & 1 deletion src/js/Inputs/Textarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ const component: React.FC<Props> = ({
setErr(err);
setMsg(msg);
validationCallback && validationCallback(err);
}, []);
}, [option.msgOnError]);
useEffect(
() => {
if (validate) {
Expand Down
2 changes: 1 addition & 1 deletion src/js/Inputs/Textbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ const component: React.FC<Props> = ({
setErr(err);
setMsg(msg);
validationCallback && validationCallback(err);
}, []);
}, [option.msgOnError]);
useEffect(
() => {
if (validate) {
Expand Down

0 comments on commit da438fa

Please sign in to comment.