Skip to content
Snippets Groups Projects
Unverified Commit 9cb9ec95 authored by github-automation-metabase's avatar github-automation-metabase Committed by GitHub
Browse files

Avoid filter popover overflow (#49211) (#49272)


* Add max-height to the click actions popover to prevent overflow and infinite scroll

* Add reproduction for #48851

* Update reproduction to speed it up

* Use existing helper for table header click

* Add max height to string filter picker

* Revert "Add max-height to the click actions popover to prevent overflow and infinite scroll"

This reverts commit 166478d8.

Co-authored-by: default avatarRomeo Van Snick <romeo@romeovansnick.be>
parent 9f6bbc9c
No related branches found
No related tags found
No related merge requests found
...@@ -1468,3 +1468,34 @@ describe("issue 47887", () => { ...@@ -1468,3 +1468,34 @@ describe("issue 47887", () => {
}); });
}); });
}); });
describe("Issue 48851", () => {
beforeEach(() => {
restore();
cy.signInAsNormalUser();
cy.viewport(1050, 300);
});
const manyValues = Array(12)
.fill(0)
.map(() => Math.round(Math.random() * 1000_000_000_000).toString(36))
.join(", ");
it("should not overflow the filter popover, even when there are a lot of values (metabase#48851)", () => {
openProductsTable();
tableHeaderClick("Title");
popover().within(() => {
cy.findByText("Filter by this column").click();
cy.findByText("Is").click();
});
popover().last().findByText("Contains").click();
popover()
.first()
.findByPlaceholderText("Enter some text")
.type(manyValues, { timeout: 0 });
popover().button("Add filter").should("be.visible");
});
});
...@@ -137,7 +137,7 @@ function StringValueInput({ ...@@ -137,7 +137,7 @@ function StringValueInput({
if (type === "partial") { if (type === "partial") {
return ( return (
<Flex p="md"> <Box p="md" pb={0} mah="40vh" style={{ overflow: "auto" }}>
<MultiAutocomplete <MultiAutocomplete
value={values} value={values}
data={[]} data={[]}
...@@ -147,7 +147,8 @@ function StringValueInput({ ...@@ -147,7 +147,8 @@ function StringValueInput({
aria-label={t`Filter value`} aria-label={t`Filter value`}
onChange={onChange} onChange={onChange}
/> />
</Flex> <Box pt="md" />
</Box>
); );
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment