Skip to content

[ BUG ] Select used inside a AlertDialog won't have the values popped in the top layer #353

@guibzo

Description

@guibzo

If I use the AlertDialog component with a Select on its inside, the select values won't pop up on the top layer:

Image

To reproduce:

  <AlertDialog>
        <AlertDialogTrigger asChild>
          <Button variant="outline">
            <Text>Show Alert Dialog</Text>
          </Button>
        </AlertDialogTrigger>

        <AlertDialogContent>
          <Select>
            <SelectTrigger>
              <SelectValue
                className="native:text-lg text-sm text-foreground"
                placeholder={"Select the problem"}
              />
            </SelectTrigger>

            <SelectContent avoidCollisions>
              <SelectGroup>
                <SelectItem label="Apple" value="apple">
                  Apple
                </SelectItem>

                <SelectItem label="Banana" value="banana">
                  Banana
                </SelectItem>

                <SelectItem label="Blueberry" value="blueberry">
                  Blueberry
                </SelectItem>
              </SelectGroup>
            </SelectContent>
          </Select>
        </AlertDialogContent>
      </AlertDialog>

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions