Skip to content

The Open Source DocuSign Alternative.

chore: set the default value on the top (#1734)

Ephraim Duncan5958f3871954
diff --git a/packages/ui/components/document/document-global-auth-access-select.tsx b/packages/ui/components/document/document-global-auth-access-select.tsx
index 9c2594beb..1901d9b62 100644
--- a/packages/ui/components/document/document-global-auth-access-select.tsx
+++ b/packages/ui/components/document/document-global-auth-access-select.tsx
@@ -1,4 +1,4 @@
-import React, { forwardRef } from 'react';
+import { forwardRef } from 'react';
import { msg } from '@lingui/core/macro';
import { useLingui } from '@lingui/react';
@@ -31,16 +31,16 @@ export const DocumentGlobalAuthAccessSelect = forwardRef<HTMLButtonElement, Sele
</SelectTrigger>
<SelectContent position="popper">
+ {/* Note: -1 is remapped in the Zod schema to the required value. */}
+ <SelectItem value={'-1'}>
+ <Trans>No restrictions</Trans>
+ </SelectItem>
+
{Object.values(DocumentAccessAuth).map((authType) => (
<SelectItem key={authType} value={authType}>
{DOCUMENT_AUTH_TYPES[authType].value}
</SelectItem>
))}
-
- {/* Note: -1 is remapped in the Zod schema to the required value. */}
- <SelectItem value={'-1'}>
- <Trans>No restrictions</Trans>
- </SelectItem>
</SelectContent>
</Select>
);
diff --git a/packages/ui/components/document/document-global-auth-action-select.tsx b/packages/ui/components/document/document-global-auth-action-select.tsx
index 290f1b462..956028339 100644
--- a/packages/ui/components/document/document-global-auth-action-select.tsx
+++ b/packages/ui/components/document/document-global-auth-action-select.tsx
@@ -1,4 +1,4 @@
-import React, { forwardRef } from 'react';
+import { forwardRef } from 'react';
import { msg } from '@lingui/core/macro';
import { useLingui } from '@lingui/react';
@@ -32,6 +32,11 @@ export const DocumentGlobalAuthActionSelect = forwardRef<HTMLButtonElement, Sele
</SelectTrigger>
<SelectContent position="popper">
+ {/* Note: -1 is remapped in the Zod schema to the required value. */}
+ <SelectItem value={'-1'}>
+ <Trans>No restrictions</Trans>
+ </SelectItem>
+
{Object.values(DocumentActionAuth)
.filter((auth) => auth !== DocumentAuth.ACCOUNT)
.map((authType) => (
@@ -39,11 +44,6 @@ export const DocumentGlobalAuthActionSelect = forwardRef<HTMLButtonElement, Sele
{DOCUMENT_AUTH_TYPES[authType].value}
</SelectItem>
))}
-
- {/* Note: -1 is remapped in the Zod schema to the required value. */}
- <SelectItem value={'-1'}>
- <Trans>No restrictions</Trans>
- </SelectItem>
</SelectContent>
</Select>
);