mantinedev / mantine

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

ScrollArea does not work with Preact #502

Closed crstffr closed 2 years ago

crstffr commented 2 years ago

Description

Interacting with a <Select/> or <MultiSelect/> component causes the browser tab to use 100% CPU, and the tab must be force-quit. I have put together a barebones demonstration of the problem using Vite & Preact. When it loads, you can interact with the <TextInput/> without problem. As soon as you click on the <Select/> input, the tab crashes.

Details

crstffr commented 2 years ago

I looked back through your release notes and noticed that you implemented the ScrollArea component as the default dropdown element for the <Select/> and <MultiSelect/> components in v3.3.0.

I rolled back to @mantine/core v3.2.3 and the select dropdown works as expected.

This may just be an issue with the Mantine ScrollArea + Preact. I have not tested it with React.

rtivital commented 2 years ago

Yep, that is the case, radix does not support preact, so scrollarea component will be unavailable until we rewrite it to support preact. The workaround is to disable ScrollArea on Select by setting dropdown component to a div – https://mantine.dev/core/select/#native-scrollbars