oolib 2.49.1 → 2.49.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -99,8 +99,12 @@ var DisplayIcon = function (_a) {
99
99
  var TextInput = function (props) {
100
100
  var id = props.id, invert = props.invert, disabled = props.disabled, icon = props.icon, type = props.type, _a = props.placeholder, placeholder = _a === void 0 ? "Enter Text..." : _a, _b = props.value, value = _b === void 0 ? "" : _b, onChange = props.onChange, onFocus = props.onFocus, onBlur = props.onBlur, readOnly = props.readOnly, iconOnClick = props.iconOnClick, eyeIcon = props.eyeIcon, S = props.S, handleValidation = props.handleValidation, validateOnMount = props.validateOnMount, actionBtn = props.actionBtn, clearBtn = props.clearBtn, className = props.className, maxLength = props.maxLength, DEPRECATED_maxNumLimiter = props.maxNumLimiter, forceFocus = props.forceFocus, //sometimes, when some other elem is clicked, we wanna trigger focus on the textinput. eg. when on mobile, the search icon is clicked on the listingpage
101
101
  _c = props.validateOnlyOnBlur, //sometimes, when some other elem is clicked, we wanna trigger focus on the textinput. eg. when on mobile, the search icon is clicked on the listingpage
102
- validateOnlyOnBlur = _c === void 0 ? false : _c;
103
- var _d = (0, react_1.useState)(""), validationStatus = _d[0], setValidationStatus = _d[1];
102
+ validateOnlyOnBlur = _c === void 0 ? false : _c, //for example, in the login form we want validation to only run, once the text input is blurred. else it can be irritating
103
+ _validationStatus = props.validationStatus;
104
+ var _d = (0, react_1.useState)(_validationStatus), validationStatus = _d[0], setValidationStatus = _d[1];
105
+ (0, react_1.useEffect)(function () {
106
+ setValidationStatus(_validationStatus);
107
+ }, [_validationStatus]);
104
108
  var composition = icon && !eyeIcon ? "icon+text" : "textOnly";
105
109
  var size = S ? "S" : "M";
106
110
  var actionBtnEnabaled = !!value && (type !== "url" ? true : validationStatus.type === "success");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.49.1",
3
+ "version": "2.49.2",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",