diff --git a/packages/webapp/src/components/form/input/index.tsx b/packages/webapp/src/components/form/input/index.tsx index b48d9e38..2d4b0ae2 100644 --- a/packages/webapp/src/components/form/input/index.tsx +++ b/packages/webapp/src/components/form/input/index.tsx @@ -1,4 +1,5 @@ import TextField from '@mui/material/TextField'; +import { row } from '@wisemapping/mindplot/src/components/widget/ColorPaletteHtml'; import React, { ChangeEvent } from 'react'; import { ErrorInfo } from '../../../classes/client'; @@ -13,6 +14,8 @@ type InputProps = { autoComplete?: string; fullWidth?: boolean; disabled?: boolean; + maxLength?: number, + rows?: number }; const Input = ({ @@ -26,6 +29,7 @@ const Input = ({ autoComplete, fullWidth = true, disabled = false, + maxLength = 254, }: InputProps): React.ReactElement => { const fieldError = error?.fields?.[name]; return ( @@ -43,6 +47,7 @@ const Input = ({ margin="dense" disabled={disabled} autoComplete={autoComplete} + inputProps={{ maxLength: maxLength }} /> ); }; diff --git a/packages/webapp/src/components/maps-page/action-dispatcher/create-dialog/index.tsx b/packages/webapp/src/components/maps-page/action-dispatcher/create-dialog/index.tsx index fd12616b..10119c74 100644 --- a/packages/webapp/src/components/maps-page/action-dispatcher/create-dialog/index.tsx +++ b/packages/webapp/src/components/maps-page/action-dispatcher/create-dialog/index.tsx @@ -86,6 +86,7 @@ const CreateDialog = ({ onClose }: CreateProps): React.ReactElement => { onChange={handleOnChange} error={error} fullWidth={true} + maxLength={60} /> { onChange={handleOnChange} required={false} fullWidth={true} + rows={3} />