oolib 2.57.3 → 2.57.4
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.
|
@@ -98,11 +98,12 @@ var DisplayIcon = function (_a) {
|
|
|
98
98
|
return (react_1.default.createElement("div", { style: { cursor: onClick ? "pointer" : "", display: "flex" }, onMouseDown: onClick || null }, IconComp && react_1.default.createElement(IconComp, { size: size, weight: "bold" })));
|
|
99
99
|
};
|
|
100
100
|
var TextInput = function (props) {
|
|
101
|
-
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,
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
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, _c = props.validateOnMount, validateOnMount = _c === void 0 ? true : _c, // i think it makes sense to always run validation the minute the comp mounts, but we will see if this has sideeffects
|
|
102
|
+
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
|
|
103
|
+
_d = 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
|
|
104
|
+
validateOnlyOnBlur = _d === void 0 ? false : _d, //for example, in the login form we want validation to only run, once the text input is blurred. else it can be irritating
|
|
104
105
|
_validationStatus = props.validationStatus;
|
|
105
|
-
var
|
|
106
|
+
var _e = (0, react_1.useState)(_validationStatus), validationStatus = _e[0], setValidationStatus = _e[1];
|
|
106
107
|
(0, react_1.useEffect)(function () {
|
|
107
108
|
setValidationStatus(_validationStatus);
|
|
108
109
|
}, [_validationStatus]);
|