diff --git a/src/components/TextInput/index.jsx b/src/components/TextInput/index.jsx index e543b0a..f4faf60 100644 --- a/src/components/TextInput/index.jsx +++ b/src/components/TextInput/index.jsx @@ -18,6 +18,7 @@ function TextInput({ type, onEnterKey, readonly, + maxLength, }) { const [val, setVal] = useState(value); const delayedOnChange = useRef( @@ -41,6 +42,7 @@ function TextInput({ readOnly={readonly} defaultValue={value} type={type} + maxLength={maxLength} placeholder={`${placeholder}${placeholder && required ? " *" : ""}`} styleName={`${value || val ? "haveValue" : ""} ${ errorMsg ? "haveError" : "" @@ -85,6 +87,7 @@ TextInput.defaultProps = { type: "text", onEnterKey: () => {}, readonly: false, + maxLength: undefined, }; TextInput.propTypes = { diff --git a/src/containers/Challenges/Listing/index.jsx b/src/containers/Challenges/Listing/index.jsx index 0a6e7fd..a78be72 100644 --- a/src/containers/Challenges/Listing/index.jsx +++ b/src/containers/Challenges/Listing/index.jsx @@ -64,6 +64,7 @@ const Listing = ({ updateFilter(filterChange); }); }} + maxLength="100" />