Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dropdown list is way below #1

Open
JAMAL0123 opened this issue Nov 1, 2024 · 1 comment
Open

dropdown list is way below #1

JAMAL0123 opened this issue Nov 1, 2024 · 1 comment

Comments

@JAMAL0123
Copy link

Hi please see attached.
im using you example from here
the list is way below the dropdown!

gh2

@JAMAL0123
Copy link
Author

import React, { useState } from "react";
import { SafeAreaView, StyleSheet, View } from "react-native";
import DropDown from "react-native-paper-dropdown-updated";
import { Provider as PaperProvider } from 'react-native-paper';

function Dashboard() {
const [showDropDown, setShowDropDown] = useState(false);
const [gender, setGender] = useState("");
const genderList = [
{
label: "Male",
value: "male",
},
{
label: "Female",
value: "female",
},
{
label: "Others",
value: "others",
},
];

return (

<PaperProvider>
      <SafeAreaView style={styles.safeContainerStyle}>
        <DropDown
          label={"Gender"}
          mode={"outlined"}
          visible={showDropDown}
          showDropDown={() => setShowDropDown(true)}
          onDismiss={() => setShowDropDown(false)}
          value={gender}
          setValue={setGender}
          list={genderList}
        />
      </SafeAreaView>
      </PaperProvider>

)
}

const styles = StyleSheet.create({
containerStyle: {
flex: 1,
},
spacerStyle: {
marginBottom: 15,
},
safeContainerStyle: {
flex: 1,
margin: 20,
justifyContent: "center",
},
});

export default Dashboard;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant