Skip to content

Select component not showing dropdown list on Android emulator #2780

Open
@SunilPadikarChapeau

Description

@SunilPadikarChapeau

Description

Select component not showing dropdown list on Android emulator

CodeSandbox/Snack link

https://codesandbox.io/

Steps to reproduce

  1. Go to '...'
  2. Click on '...'
  3. Scroll down to '...'
  4. See error

gluestack-ui Version

2

Platform

  • Expo
  • React Native CLI
  • Next
  • Web
  • Android
  • iOS

Other Platform

No response

Additional Information

Here is my component.

`import {
Select,
SelectTrigger,
SelectInput,
SelectIcon,
SelectPortal,
SelectBackdrop,
SelectContent,
SelectDragIndicator,
SelectDragIndicatorWrapper,
SelectItem,
} from '@/components/ui/select';
import { ChevronDownIcon } from '@/components/ui/icon';
import { ComponentProps, useState } from 'react';
import { View } from '@Components/Themed';
import { FormControlLabel, FormControlLabelText } from '@Components/ui/form-control';
import { VStack } from '@Components/ui/vstack';
import { Text } from '@Components/ui/text';
export interface SelectOption {
label: string;
value: string;
}
interface SelectProps extends ComponentProps {
options: SelectOption[];
label: string;
selectTriggerProps?: ComponentProps;
}

export const SelectInput1: React.FC = ({ children, options, label, selectTriggerProps, ...props }) => {
console.log('SelectInput1', options);
return (
//

    // <Text >
    //   Select an Option:
    // </Text>
    <Select defaultValue="1" placeholder="Select code">
          <SelectTrigger>
            <SelectInput />
            <SelectIcon as={ChevronDownIcon}  />
          </SelectTrigger>
          <SelectPortal>
            <SelectBackdrop />
            <SelectContent>
              <SelectDragIndicatorWrapper>
                <SelectDragIndicator />
              </SelectDragIndicatorWrapper>
              {options.map((item, index) => (
                <SelectItem
                  label={`${item.label}`}
                  value={`${item.value}`}
                  key={`${item.value}-${index}`}
                />
              ))}
            </SelectContent>
          </SelectPortal>
        </Select>
//   </VStack>
);

};
`

Screenshot

Image

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions