Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward Xiao committed Aug 26, 2019
1 parent 03f7662 commit df3811a
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 26 deletions.
2 changes: 1 addition & 1 deletion lib/components/Textarea.js
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ var component = function component(_ref) {
setInternalValue(String(value));
}, [value]);
useEffect(function () {
if (prevInternalValue && prevInternalValue !== internalValue) {
if (typeof prevInternalValue !== 'undefined' && prevInternalValue !== internalValue) {
if (option.customFunc) {
check();
}
Expand Down
10 changes: 1 addition & 9 deletions lib/components/Textbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -661,20 +661,12 @@ var component = function component(_ref) {
setInternalValue(String(value));
}, [value]);
useEffect(function () {
if (prevInternalValue && prevInternalValue !== internalValue) {
if (typeof prevInternalValue !== 'undefined' && prevInternalValue !== internalValue) {
if (option.customFunc) {
check();
}
}
}, [internalValue]);
useEffect(function () {
/* istanbul ignore if because it won't happen */
if ($el === null) {
return;
}

$el.current.removeAttribute('value');
});
useEffect(function () {
if (asyncObj) {
if (asyncObj.message) {
Expand Down
4 changes: 2 additions & 2 deletions 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.

4 changes: 2 additions & 2 deletions 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": "3.4.3",
"version": "3.4.5",
"description": "React form input validation components",
"main": "index.js",
"repository": {
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 @@ -316,7 +316,7 @@ const component: React.FC<Props> = ({
);
useEffect(
() => {
if (prevInternalValue && prevInternalValue !== internalValue) {
if (typeof prevInternalValue !== 'undefined' && prevInternalValue !== internalValue) {
if (option.customFunc) {
check();
}
Expand Down
9 changes: 1 addition & 8 deletions src/js/Inputs/Textbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -396,21 +396,14 @@ const component: React.FC<Props> = ({
);
useEffect(
() => {
if (prevInternalValue && prevInternalValue !== internalValue) {
if (typeof prevInternalValue !== 'undefined' && prevInternalValue !== internalValue) {
if (option.customFunc) {
check();
}
}
},
[internalValue],
);
useEffect(() => {
/* istanbul ignore if because it won't happen */
if ($el === null) {
return;
}
$el.current.removeAttribute('value');
});
useEffect(
() => {
if (asyncObj) {
Expand Down

0 comments on commit df3811a

Please sign in to comment.