Unverified Commit ec447b66 authored by Mahesh Maney R's avatar Mahesh Maney R Committed by GitHub
Browse files

Merge pull request #5 from UPHRH-platform/textarea-maxlength

changes for return to institute
No related merge requests found
Showing with 11421 additions and 1 deletion
+11421 -1
package-lock.json 0 → 100644
+ 11417
0
View file @ ec447b66
This diff is collapsed.
......@@ -18,6 +18,7 @@ interface TextAreaFieldProps {
defaultValue?: string;
isReadOnly?: boolean;
isRequired?: boolean;
maxLength?: any;
}
export const TextAreaField = ({
......@@ -31,6 +32,7 @@ export const TextAreaField = ({
isReadOnly,
isRequired,
defaultValue,
maxLength
}: TextAreaFieldProps) => {
const [characterCount, setCharacterCount] = useState(0);
......@@ -57,7 +59,7 @@ export const TextAreaField = ({
onKeyUp={(e) => {
updateCharacterCount(e);
}}
maxLength={200}
maxLength={maxLength?maxLength:200}
value={value}
defaultValue={defaultValue}
readOnly={isReadOnly ? true : false}
......
......@@ -136,6 +136,7 @@ export const ModalTwo = ({
rows={6}
label={textAreaLabel}
value={note}
maxLength={true}
changeHandler={(e) => setNote(e.target.value)}
/>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment