Closed ildibicaku closed 4 months ago
I searched, but didn't find anything for changing defaultButtonText. But you can change it from your side using useState. I will share an example
const [defaultColorGender, setDefaultColorGender] = useState('gray') // Here you can use your default color
<SelectDropdown dropdownStyle={{ borderRadius: 15 }} data={gender} renderDropdownIcon={DropDownIcon} buttonStyle={{ width: '90%', backgroundColor: '#FFFFFF' }} onSelect={(selectedItem, index) => { setDefaultColorGender('#000000') // As you select any option from dropdown then you can change color of your button text }} selectedRowStyle={{ backgroundColor: '#F4F7FF' }} selectedRowTextStyle={{ color: COLORS.Primary,fontFamily: FONTS.Medium }} rowStyle={{ backgroundColor: '#FFFFFF' }} rowTextStyle={{ textAlign: 'left', paddingLeft: 5, fontSize: 14 ,fontFamily: FONTS.Medium }} defaultButtonText='Add your gender' buttonTextStyle={{ color:defaultColorGender }} // In start You will get your default color here />
Thank you @aqifkhan
A lot of changes were made in v4.0, take a look here https://github.com/AdelRedaa97/react-native-select-dropdown?tab=readme-ov-file#-major-changes
Feel free to open the issue again if it still exists
Is there any way i can change the color of defaultButtonText ? Lets say I want defaultButtonText color gray and when I selected one of the values the value to appear black