Add label list edit panel
This commit is contained in:
@@ -12,6 +12,7 @@ interface IAttrInputProps {
|
||||
value?: number | string;
|
||||
isNumber?: boolean;
|
||||
maxLength?: number;
|
||||
minLength?: number;
|
||||
max?: number;
|
||||
min?: number;
|
||||
step?: number;
|
||||
@@ -40,6 +41,11 @@ class AttrInput extends Component<IAttrInputProps> {
|
||||
return <Localization i18nKey="Input.Error.Length" options={{ num: maxLength.toString() }} />
|
||||
}
|
||||
|
||||
const minLength = this.props.minLength ?? 1;
|
||||
if (value.length < minLength) {
|
||||
return <Localization i18nKey="Input.Error.Length.Less" options={{ num: minLength.toString() }} />
|
||||
}
|
||||
|
||||
if (this.props.isNumber) {
|
||||
const praseNumber = (value as any) / 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user