1

Any idea how can we pass the values that has a checked checkbox? like if I checked checkbox no: 1,2,3 and etc.. then pass these to the Text Input

We can store the selected (checked checkbox) values in a class variable, for e.g this.selectedItem = item; when check box is true. Now we can use selectedItem anyway and anywhere we want, but I need to store multiple values.

Need to pass multiple checked checkbox values to TextInput React Native.

10
  • 1
    Be more specific about your question and add the code snippet or a link to your code. Commented Apr 26, 2019 at 6:35
  • can you please be more specific and what have you tried? Commented Apr 26, 2019 at 6:37
  • Here I can get checked checkbox value of one and it's replacing with new value and i tried to get second Checkbox value. Commented Apr 26, 2019 at 6:39
  • I tried this code and where i can get single checkbox value _myFunction(value,name,checked){ this.selectedValue = value; console.warn("this.selectedValue = value : "+this.selectedValue) }; <Checkbox name={test} checked={false} size={30} onChange={(name, checked) => this._myFunction(name[i],i, checked)} /> Commented Apr 26, 2019 at 6:42
  • Can you please supply some visual representation of your requirement too? TextInput accepts only one string value or not? Commented Apr 26, 2019 at 7:16

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.