mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-25 15:47:55 +01:00
Define max input sizes for dialog
This commit is contained in:
parent
b892c25e3c
commit
275f05a41e
@ -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 }}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
@ -86,6 +86,7 @@ const CreateDialog = ({ onClose }: CreateProps): React.ReactElement => {
|
||||
onChange={handleOnChange}
|
||||
error={error}
|
||||
fullWidth={true}
|
||||
maxLength={60}
|
||||
/>
|
||||
|
||||
<Input
|
||||
@ -99,6 +100,7 @@ const CreateDialog = ({ onClose }: CreateProps): React.ReactElement => {
|
||||
onChange={handleOnChange}
|
||||
required={false}
|
||||
fullWidth={true}
|
||||
rows={3}
|
||||
/>
|
||||
</FormControl>
|
||||
</BaseDialog>
|
||||
|
Loading…
Reference in New Issue
Block a user