Skip to content

Commit

Permalink
fix(core): Dropdown fix initial width
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimirpotekhin committed Nov 29, 2024
1 parent a28e79b commit 543f8aa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions projects/core/directives/dropdown/dropdown.style.less
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
.t-scroll {
flex-grow: 1;
max-inline-size: 100%;
inline-size: max-content;
overscroll-behavior: none;
}

Expand Down
10 changes: 10 additions & 0 deletions projects/demo-playwright/tests/core/dropdown/dropdown.pw.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,16 @@ test.describe('Dropdown', () => {
await expect(page).toHaveScreenshot('05-dropdown.png');
});

test('Hosted dropdown initial width', async ({page}) => {
await tuiGoto(page, DemoRoute.Viewport);
const example = new TuiDocumentationPagePO(page).getExample('#portal');

await example.scrollIntoViewIfNeeded();
await example.locator('.t2').click({force: true});

Check warning on line 63 in projects/demo-playwright/tests/core/dropdown/dropdown.pw.spec.ts

View workflow job for this annotation

GitHub Actions / Lint

Unexpected use of { force: true } option

await expect(page).toHaveScreenshot('13-dropdown.png');
});

test('Esc -> Hosted Dropdown', async ({page}) => {
await tuiGoto(page, DemoRoute.DropdownOpen);
const example = new TuiDocumentationPagePO(page).getExample('#tui-dropdown-host');
Expand Down

0 comments on commit 543f8aa

Please sign in to comment.