+ {/* Connection Group Dropdown */}
+ {/*
+
+ o.value === selectedGroup)}
+ onSelect={(option: SearchableDropdownOptions) => setSelectedGroup(option.value)}
+ placeholder="Select a group"
+ />
+
*/}
+ {/* Existing connection form fields */}
{context.state.connectionComponents.mainOptions.map((inputName, idx) => {
const component =
context.state.formComponents[inputName as keyof IConnectionDialogProfile];
if (component?.hidden !== false) {
return undefined;
}
-
return (
{
+ // Explicitly remove undefined from the possible type so parameters are contextually typed
+ const handleChange: NonNullable = (_event, data) => {
setColor({ ...data.color, a: 1 });
};
@@ -117,6 +125,7 @@ export const ConnectionGroupDialog = ({
color:
new TinyColor(color).toHexString(false /* allow3Char */).toUpperCase() ||
undefined,
+ scope,
});
}
}
@@ -146,25 +155,42 @@ export const ConnectionGroupDialog = ({
>
)}{" "}
+
+ setScope(data.optionValue as "user" | "workspace")}>
+
+
+
+
{
+ onChange={(
+ _e: React.ChangeEvent,
+ data: InputOnChangeData,
+ ) => {
setGroupName(data.value);
}}
required
placeholder={Loc.connectionGroups.enterConnectionGroupName}
/>
- {" "}
+