Skip to content

Commit

Permalink
fix(select): options are visible with fit-content width and fill outline
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-perkins committed Apr 26, 2024
1 parent ca01fe8 commit 3e7dd5b
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/src/components/select-popover/select-popover.md.scss
Expand Up @@ -2,7 +2,11 @@
@import "./select-popover.md.vars";

ion-list ion-radio::part(container) {
opacity: 0;
display: none;
}

ion-list ion-radio::part(label) {
@include margin(0);
}

ion-item {
Expand Down
33 changes: 33 additions & 0 deletions core/src/components/select/test/fill/select.e2e.ts
Expand Up @@ -237,4 +237,37 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
await expect(notchCutout).toBeHidden();
});
});

test(title('select: fill outline: fit-content should display select options'), async ({ page }, testInfo) => {
testInfo.annotations.push({
type: 'issue',
description: 'https://github.com/ionic-team/ionic-framework/issues/29321',
});
await page.setContent(
`
<ion-select
fill="outline"
aria-label="Fruit"
value="apple"
interface="popover"
style="width: fit-content"
>
<ion-select-option value="5">5</ion-select-option>
<ion-select-option value="10">10</ion-select-option>
<ion-select-option value="15">15</ion-select-option>
</ion-select>
`,
config
);

const select = page.locator('ion-select');
const ionPopoverDidPresent = await page.spyOnEvent('ionPopoverDidPresent');

await select.click();
await ionPopoverDidPresent.next();

const selectPopover = page.locator('ion-select-popover');

await expect(selectPopover).toHaveScreenshot(screenshot(`select-fill-outline-fit-content`));
});
});
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3e7dd5b

Please sign in to comment.