Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6290

How to disable the Touchable Opacity for some specific item that comes from API in React Native

$
0
0

I have an API and I need to set the Touchable Opacity separatelyfor each item. I have done it already. but now I need to disable someTouchable Opacity. Like what I am trying to do is if Status and Check in Api both are True then the User can move to next and colour of it is red.screen by pressing on that touchable opacity but if one of them isfalse then the touchable opacity will be disabled and user can't move to next screen and colour of it will be grey I don't know how to do it because I am very new in these kind of functionality in React-native I read different questions and answers but unfortunately that doesn't help me.

Api Response

const results = [   {            Id: "IySO9wUrt8",            Name: "Los Stand",            Category: "Mexican",            Status: true,            Check: true,        },    {            Id: "IySO9wUrt8",            Name: "Los Stand 2",            Category: "Burger",            Status: true,            Check: true,        },     {            Id: "IySO9wUrt8",            Name: "Los Stand 3",            Category: "BBq",            Status: true,            Check: true,        },      ];

You can edit code in Expo Snack

My Expo code for live editing


Viewing all articles
Browse latest Browse all 6290

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>