tp-react-elements-dev 1.4.8 → 1.4.9
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.
- package/dist/components/Form/FormRender.d.ts +2 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +13 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -52333,6 +52333,19 @@ const RenderForm = (props) => {
|
|
|
52333
52333
|
value: field.value || "", size: "small", disabled: props.item.disable, onBlur: (e) => {
|
|
52334
52334
|
var _a, _b;
|
|
52335
52335
|
((_a = props === null || props === void 0 ? void 0 : props.item) === null || _a === void 0 ? void 0 : _a.onBlurFn) && ((_b = props === null || props === void 0 ? void 0 : props.item) === null || _b === void 0 ? void 0 : _b.onBlurFn(e));
|
|
52336
|
+
}, inputProps: {
|
|
52337
|
+
maxLength: props.item.maxLength || 100,
|
|
52338
|
+
onInput: (e) => {
|
|
52339
|
+
var _a;
|
|
52340
|
+
if (!((_a = props === null || props === void 0 ? void 0 : props.item) === null || _a === void 0 ? void 0 : _a.allowSpecialChars)) {
|
|
52341
|
+
const value = e.target.value;
|
|
52342
|
+
e.target.value = value.replace(/[^a-zA-Z0-9 ]/g, "");
|
|
52343
|
+
} // Allow only alphanumeric and space
|
|
52344
|
+
if (e.target.value.length === 1 &&
|
|
52345
|
+
e.target.value === " ") {
|
|
52346
|
+
e.target.value = "";
|
|
52347
|
+
}
|
|
52348
|
+
},
|
|
52336
52349
|
} })), ((_a = props === null || props === void 0 ? void 0 : props.item) === null || _a === void 0 ? void 0 : _a.helperText) && (jsxRuntimeExports.jsxs("span", Object.assign({ style: {
|
|
52337
52350
|
fontFamily: "Roboto-Reg",
|
|
52338
52351
|
fontSize: "11px",
|