Sort topic params (#994)
This commit is contained in:
parent
8a36af12b1
commit
cf3708a3e1
1 changed files with 11 additions and 9 deletions
|
@ -63,15 +63,17 @@ const CustomParamField: React.FC<Props> = ({
|
|||
defaultValue={field.name}
|
||||
>
|
||||
<option value="">Select</option>
|
||||
{Object.keys(TOPIC_CUSTOM_PARAMS).map((opt) => (
|
||||
<option
|
||||
key={opt}
|
||||
value={opt}
|
||||
disabled={existingFields.includes(opt)}
|
||||
>
|
||||
{opt}
|
||||
</option>
|
||||
))}
|
||||
{Object.keys(TOPIC_CUSTOM_PARAMS)
|
||||
.sort()
|
||||
.map((opt) => (
|
||||
<option
|
||||
key={opt}
|
||||
value={opt}
|
||||
disabled={existingFields.includes(opt)}
|
||||
>
|
||||
{opt}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
<p className="help is-danger">
|
||||
<ErrorMessage errors={errors} name={`customParams.${index}.name`} />
|
||||
|
|
Loading…
Add table
Reference in a new issue