fix(ui): max length for variant and flag key
This commit is contained in:
parent
9a5d7d53a6
commit
f9ce134f44
2 changed files with 4 additions and 2 deletions
|
|
@ -78,9 +78,10 @@ function Multivariant() {
|
|||
<Input
|
||||
placeholder={`buy-btn-variant-${ind + 1}`}
|
||||
value={variant.value}
|
||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
|
||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
if (e.target.value?.length > 25) return;
|
||||
variant.setKey(e.target.value)
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<div style={{ flex: 4 }}>
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ function NewFFlag({ siteId, fflagId }: { siteId: string; fflagId?: string }) {
|
|||
placeholder={'new-unique-key'}
|
||||
value={current.flagKey}
|
||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
if (e.target.value?.length > 60) return;
|
||||
current.setFlagKey(e.target.value.replace(/\s/g, '-'));
|
||||
}}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue