Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

266
Views
How can I trigger when a specific button is pressed in react-native-picker-select?

I am using react-native-picker-select. When there is data called ingre, I want ingrebool to be false when a,b,c,d is pressed and to be true when e is pressed. What should I do?

this is my code

            export const ingre = [
                { label: 'a', value: 'Tangerinefeed' },
                { label: 'b', value: 'dryexamfeed' },
                { label: 'c', value: 'wetfeed' },
                { label: 'd', value: 'sawdust' },
                { label: 'e', value: 'etc' },
            ];



            
            export const ArrowIconPickerObj = ({ingre }) => {
            const [ingrebool, setIngrebool] = useState(false)
                return (
                    <RNPickerSelect
                        items={ingre}
                    />
                )

            }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You figured it out yourself already: Set ingrebool to be false when a,b,c,d is pressed and to be true when e is pressed.

 <RNPickerSelect
   items={ingre}
   onValueChange={value => setIngrebool(value === "etc")}
 />
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!