-
Notifications
You must be signed in to change notification settings - Fork 297
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
[How]: To Change the color of ArrowIcon in react-native-dropdown-picker #762
Comments
Hey @Shahbaz898414, Sorry for the late response! To fix the icon color issue, please refer to the following documentation:
Instead of using color, apply tintColor for the icons. Since you’re not using any icons from react-native-vector-icons, this should work perfectly. Please update and add the following lines:
Additionally, here’s the updated code snippet for your reference:
Hope your issue will fix after this changes I've also attached a screenshot for reference. |
thanks bro @Sujalkumar12 |
Hi @Shahbaz898414, I'm glad to hear that the solution worked for you! If you're satisfied with it, please consider closing this issue. It helps keep the repository organized. Thanks! |
Need
in placeholder right side there is down arrow icon i want to change the color this icon orange
Code Part
import React, {useState} from 'react';
import {View, StyleSheet} from 'react-native';
import DropDownPicker from 'react-native-dropdown-picker';
import Icon from 'react-native-vector-icons/MaterialIcons'; // Add this import
const SelectBrand = () => {
const [open, setOpen] = useState(false);
const [selectedBrand, setSelectedBrand] = useState(null);
const [items, setItems] = useState([
{label: 'Brand A', value: 'brand_a', labelStyle: {color: '#FC8C4D'}},
{label: 'Brand B', value: 'brand_b', labelStyle: {color: '#FC8C4D'}},
{label: 'Brand C', value: 'brand_c', labelStyle: {color: '#FC8C4D'}},
{label: 'Brand D', value: 'brand_d', labelStyle: {color: '#FC8C4D'}},
{label: 'Brand E', value: 'brand_e', labelStyle: {color: '#FC8C4D'}},
{label: 'Brand F', value: 'brand_f', labelStyle: {color: '#FC8C4D'}},
{label: 'Brand G', value: 'brand_g', labelStyle: {color: '#FC8C4D'}},
{label: 'Brand I', value: 'brand_i', labelStyle: {color: '#FC8C4D'}},
]);
return (
<DropDownPicker
open={open}
value={selectedBrand}
items={items}
setOpen={setOpen}
setValue={setSelectedBrand}
setItems={setItems}
style={SelectBrandstyles.dropdown}
placeholder="Select Brand"
placeholderStyle={SelectBrandstyles.placeholderStyle}
dropDownContainerStyle={SelectBrandstyles.dropDownContainerStyle}
selectedItemContainerStyle={SelectBrandstyles.selectedTextStyle}
labelStyle={{color: '#FC8C4D'}}
// arrowIconStyle={{color: '#FC8C4D'}}
arrowIcon={}
dropDownDirection="Bottom"
zIndex={1000}
zIndexInverse={3000}
/>
);
};
const SelectBrandstyles = StyleSheet.create({
container: {
padding: 10,
backgroundColor: '#fff',
zIndex: 1000, // Ensure parent container is above others
},
dropdown: {
height: 50,
borderColor: '#FF6700',
borderWidth: 1,
borderRadius: 4,
paddingHorizontal: 10,
color: '#FC8C4D',
},
dropDownContainerStyle: {
borderColor: '#FF6700',
color: '#FC8C4D',
zIndex: 1000, // Ensure dropdown container is above others
},
placeholderStyle: {
fontSize: 16,
color: '#FC8C4D',
},
selectedTextStyle: {
fontSize: 16,
color: '#FC8C4D',
},
});
export default SelectBrand;
###Screen Shot
The text was updated successfully, but these errors were encountered: