Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

refactor(ui): add default option

robin6a3e6da237b3
diff --git a/ui/src/components/SchemaForm/index.tsx b/ui/src/components/SchemaForm/index.tsx
index 899fbd2a..47c955d1 100644
--- a/ui/src/components/SchemaForm/index.tsx
+++ b/ui/src/components/SchemaForm/index.tsx
@@ -312,6 +312,9 @@ const SchemaForm: ForwardRefRenderFunction<IRef, IProps> = (
value={formData[key]?.value || defaultValue}
onChange={handleSelectChange}
isInvalid={formData[key].isInvalid}>
+ <option disabled selected>
+ {t('select')}
+ </option>
{properties[key].enum?.map((item, index) => {
return (
<option value={String(item)} key={String(item)}>