From 57673fc4292eb866c074b07ca3df2c7b24f497d0 Mon Sep 17 00:00:00 2001 From: Evan Almloff Date: Thu, 9 Oct 2025 12:48:02 -0500 Subject: [PATCH 1/2] Fix the dropdown component styling in the preview --- preview/src/components/dropdown_menu/variants/main/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/preview/src/components/dropdown_menu/variants/main/mod.rs b/preview/src/components/dropdown_menu/variants/main/mod.rs index 6123da44..7cd77a1f 100644 --- a/preview/src/components/dropdown_menu/variants/main/mod.rs +++ b/preview/src/components/dropdown_menu/variants/main/mod.rs @@ -1,7 +1,7 @@ -use dioxus::prelude::*; -use dioxus_primitives::dropdown_menu::{ +use super::super::component::{ DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, }; +use dioxus::prelude::*; use strum::IntoEnumIterator; #[derive(Clone, Copy, strum::Display, strum::EnumIter, PartialEq)] From 994c38d5016b7d433319c1ca8274ef117439d10a Mon Sep 17 00:00:00 2001 From: Evan Almloff Date: Fri, 10 Oct 2025 08:32:43 -0500 Subject: [PATCH 2/2] fix dropdown menu playwright test --- playwright/dropdown-menu.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playwright/dropdown-menu.spec.ts b/playwright/dropdown-menu.spec.ts index fef7e8d2..206ffd58 100644 --- a/playwright/dropdown-menu.spec.ts +++ b/playwright/dropdown-menu.spec.ts @@ -39,7 +39,7 @@ test('test', async ({ page }) => { await menuElement.click(); await expect(menuElement).toHaveAttribute('data-state', 'open'); // Clicking outside the menu should close it - await page.click('body'); + await page.locator('body').click({ position: { x: 0, y: 0 } }); await expect(menuElement).toHaveAttribute('data-state', 'closed'); // Reopen the menu