Browse Source

update autoID options value

tumao 4 years ago
parent
commit
6128d1f66d

+ 2 - 2
client/src/pages/collections/Constants.ts

@@ -43,10 +43,10 @@ export const ALL_OPTIONS: KeyValuePair[] = [
 export const AUTO_ID_OPTIONS: KeyValuePair[] = [
   {
     label: 'On',
-    value: 'On',
+    value: 'true',
   },
   {
     label: 'Off',
-    value: 'Off',
+    value: 'false',
   },
 ];

+ 2 - 2
client/src/pages/collections/CreateFields.tsx

@@ -171,9 +171,9 @@ const CreateFields: FC<CreateFieldsProps> = ({
         <CustomSelector
           label={t('autoId')}
           options={AUTO_ID_OPTIONS}
-          value={autoID ? 'On' : 'Off'}
+          value={autoID ? 'true' : 'false'}
           onChange={(e: React.ChangeEvent<{ value: unknown }>) => {
-            const autoId = e.target.value === 'On';
+            const autoId = e.target.value === 'true';
             setAutoID(autoId);
           }}
           variant="filled"