tp-react-elements-dev 1.4.9 → 1.4.10
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/index.esm.js +13 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -52700,7 +52700,19 @@ const RenderForm = (props) => {
|
|
|
52700
52700
|
},
|
|
52701
52701
|
}, minRows: props.item.minRows || 1,
|
|
52702
52702
|
// maxRows={2}
|
|
52703
|
-
placeholder: props.item.placeholder || "Type Something..." }, field, { label: `${props.item.label}${props.item.required ? ' *' : ''}`, value: field.value || "", disabled: props.item.disable
|
|
52703
|
+
placeholder: props.item.placeholder || "Type Something..." }, field, { label: `${props.item.label}${props.item.required ? ' *' : ''}`, value: field.value || "", disabled: props.item.disable, inputProps: {
|
|
52704
|
+
onInput: (e) => {
|
|
52705
|
+
var _a;
|
|
52706
|
+
if (!((_a = props === null || props === void 0 ? void 0 : props.item) === null || _a === void 0 ? void 0 : _a.allowSpecialChars)) {
|
|
52707
|
+
const value = e.target.value;
|
|
52708
|
+
e.target.value = value.replace(/[^a-zA-Z0-9 ]/g, "");
|
|
52709
|
+
} // Allow only alphanumeric and space
|
|
52710
|
+
if (e.target.value.length === 1 &&
|
|
52711
|
+
e.target.value === " ") {
|
|
52712
|
+
e.target.value = "";
|
|
52713
|
+
}
|
|
52714
|
+
},
|
|
52715
|
+
} })), jsxRuntimeExports.jsx(ErrorMessageComponent, { children: jsxRuntimeExports.jsx(s, { errors: props.errors, name: props.item.name }) })] })) }) }));
|
|
52704
52716
|
// case "textarea-normal":
|
|
52705
52717
|
// return (
|
|
52706
52718
|
// <>
|