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

141
Views
Selecting all the row values of table in react

Peace my friends

so i have an component in react which contains of approx. 12 constants like the following:

const postsOffCountry = <td>{props.posts.map((post => {return <input key={post.ref} defaultValue={post.oland} className={post.ref}
onBlur={(event) => props.variables.setOffCountry(event.target.value)}></input>}))}</td>;

and im rendering them like following:

return (
<>
<tbody>
  <tr onClick={(e) => console.log(e.target.value)}>
    <td>{postsRef}</td>     
    <td>{postsOpInf}</td>
    <td>{postsState}</td>
    <td>{postsInf}</td>
    {/* <td>{postsLoadingDate}</td> */}
    <td>{postsLoadingCountry}</td>
    <td>{postsLoadingZip}</td>
    <td>{postsLoadingCity}</td>
    {/* <td>{postsOffDate}</td> */}
    <td>{postsOffCountry}</td>
    <td>{postsOffZip}</td>
    <td>{postsOffCity}</td>
    <td>{postsCustomerClearence}</td>
    <td>{postsPalNumber}</td>
    <td>{postsOrganiser}</td>
    <td>{postsUpdateButton}</td>
    <td>{postsMailButton}</td>
  </tr>
</tbody>  
</>
);

my problem is how can i select all the values of the input fields and set them to their correct useState variable which is passed over from the parentcomponent with props. (e.g. props.variables.setOffCity());

i have been stuck on this for days now any help would be highly appreciated!

about 4 years ago · Santiago Gelvez
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!