ClickHouse / click-ui

The home of the ClickHouse design system and component library.

Home Page:https://click-ui.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Select doesn't work inside of Dialog

alexkorep opened this issue · comments

Steps to reproduce

  • Place a Select inside a Dialog:
    <Dialog open={open}>
      <Dialog.Content title="Dialog" data-testid="service-connect-modal">
        <Select
          value={'no value'}
          onSelect={(value): void => {
            alert(value);
          }}
        >
          <Select.Item value="item1">Item 1</Select.Item>
          <Select.Item value="item2">Item 2</Select.Item>
        </Select>
      </Dialog.Content>
    </Dialog>
  • Show the dialog, try to select the item.

Expected result

  • the items have the hand icon and can be selected.

Actual results

  • the items cannot be selected.
  • The items have CSS attribute pointer-events: none; inherited from body, because they exist outside of the Dialog HTML container.
  • Video:
select.mov

I have seen that the same issue is reported in radix-ui
radix-ui/primitives#2121
Since we need to update the pointer events globally and since we don't have a global css in click-ui we might need to wait until they publish the fix
I'll comment on the ticket they posted for now