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

Disable individual drop down item #111

Open
connercms opened this issue Jun 20, 2018 · 6 comments
Open

Disable individual drop down item #111

connercms opened this issue Jun 20, 2018 · 6 comments

Comments

@connercms
Copy link

I see in the documentation that there is the disabledItemColor prop, but how do you disable an individual drop down item?

@rahulbansal89
Copy link

I am also facing the same issue, referred to the example which is using props: { disabled: true } property but after using the same also, disabledItemColor not working at all.

I have used a trick to do that which is: <Text style={{ color: disabled? 'grey' : 'black' }}></Text> but it will show [object object] after selecting that item because you will select an element here not the text.

Hence there no way to stop selecting a disable item here.

@hiteshgoyal18
Copy link

I am also facing same issue. How we can disable an item in dropdown.

@myhendry
Copy link

myhendry commented Apr 7, 2019

Anyone able to successfully disable individual drop down item? I can't get it to work. i tried using propsExtractor but the props value only return undefined. Please help

@navanit-jha
Copy link

I am also facing the same issue. Plz help

@shreyansh-g24
Copy link

You can disable individual items using propsExtractor. For instance I used this method to disable items with a falsy value.

propsExtractor={item => {
if (!item.value) {
return { disabled: true };
} else {
return {};
}
}}

@steveZak
Copy link

The above works to disable items. However if you are looking to scroll, the disabled items don't respond to dragging.

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

7 participants