Skip to content

A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.

feat: add initial focus on new integration search (#2015)

Meier Lukasb30c192b8fbb
diff --git a/apps/nextjs/src/app/[locale]/manage/integrations/new/_integration-new-dropdown.tsx b/apps/nextjs/src/app/[locale]/manage/integrations/new/_integration-new-dropdown.tsx
index 188916e9e..bc5746292 100644
--- a/apps/nextjs/src/app/[locale]/manage/integrations/new/_integration-new-dropdown.tsx
+++ b/apps/nextjs/src/app/[locale]/manage/integrations/new/_integration-new-dropdown.tsx
@@ -15,7 +15,9 @@ export const IntegrationCreateDropdownContent = () => {
const [search, setSearch] = useState("");
const filteredKinds = useMemo(() => {
- return integrationKinds.filter((kind) => kind.includes(search.toLowerCase()));
+ return integrationKinds.filter((kind) =>
+ getIntegrationName(kind).toLowerCase().includes(search.toLowerCase().trim()),
+ );
}, [search]);
const handleSearch = React.useCallback(
@@ -29,6 +31,7 @@ export const IntegrationCreateDropdownContent = () => {
leftSection={<IconSearch stroke={1.5} size={20} />}
placeholder={t("integration.page.list.search")}
value={search}
+ data-autofocus
onChange={handleSearch}
/>
diff --git a/apps/nextjs/src/app/[locale]/manage/integrations/page.tsx b/apps/nextjs/src/app/[locale]/manage/integrations/page.tsx
index 38a0a2cdf..2daeea657 100644
--- a/apps/nextjs/src/app/[locale]/manage/integrations/page.tsx
+++ b/apps/nextjs/src/app/[locale]/manage/integrations/page.tsx
@@ -102,7 +102,15 @@ export default async function IntegrationsPage(props: IntegrationsPageProps) {
const IntegrationSelectMenu = ({ children }: PropsWithChildren) => {
return (
- <Menu width={256} trapFocus position="bottom-end" withinPortal shadow="md" keepMounted={false}>
+ <Menu
+ width={256}
+ trapFocus
+ position="bottom-end"
+ withinPortal
+ shadow="md"
+ keepMounted={false}
+ withInitialFocusPlaceholder={false}
+ >
{children}
<MenuDropdown>
<IntegrationCreateDropdownContent />