mantinedev / mantine

A fully featured React components library
https://mantine.dev
MIT License
26.91k stars 1.9k forks source link

When Combobox.Search is used with ScrollArea, it will exceed the boundary. #6562

Closed minosss closed 3 months ago

minosss commented 4 months ago

Dependencies check up

What version of @mantine/* packages do you have in package.json?

7.11.2

What package has an issue?

@mantine/core

What framework do you use?

Next.js

In which browsers you can reproduce the issue?

Chrome

Describe the bug

When Combobox.Search is used with ScrollArea, it will exceed the boundary. Because the search input set width style calc(100% + var(--combobox-padding) * 2). However, there is no processing done when there are ScrollArea.

If possible, include a link to a codesandbox with a minimal reproduction

https://codesandbox.io/p/sandbox/icy-snow-5g2f6m

Possible fix

Reset width when there are has ScrollArea

.mantine-Combobox-dropdown:has([data-mantine-scrollbar]) .mantine-Combobox-search {
  width: calc(100% + var(--combobox-padding));
}

Self-service

rtivital commented 3 months ago

Fixed in 7.12.1