🐛(react) fix inputs overflowing placeholder

The oveflowing labels were spreading on two lines. I had to wrap a
span inside a label in order to be able to deal with the text-oveflow
plus the absolute positionning.
This commit is contained in:
Nathan Vasse
2023-10-04 17:09:08 +02:00
committed by NathanVss
parent ff2a56af6d
commit d39d33d02c
8 changed files with 114 additions and 6 deletions

View File

@@ -50,7 +50,7 @@ describe("<Select multi={true} />", () => {
const menu: HTMLDivElement = screen.getByRole("listbox", {
name: "Cities",
});
const label = screen.getByText("Cities");
const label = screen.getByText("Cities")!.parentElement!;
// Expect no options to be selected.
expectSelectedOptions([]);
@@ -721,7 +721,7 @@ describe("<Select multi={true} />", () => {
screen.getByRole("combobox", {
name: "Cities",
});
const label = screen.getByText("Cities");
const label = screen.getByText("Cities")!.parentElement!;
expect(Array.from(label.classList)).toContain("offscreen");
});