Is there a way where i can grab the row values with the same className of the button in each row and set the values into the correct useState variables?
The code for the tds is as built as following:
const postsOffCountry = <td>{props.posts.map((post => (<input key={post.rowid} defaultValue={post.lcountry} className={post.ref}
onBlur={(event) => props.variables.setLoadingCountry(event.target.value)}></input>)))}</td>;
const postsUpdateButton = <td>{props.posts.map((post, i) => (<button key={i} className={post.ref} onClick={(event) => {props.variables.update(event.target.id);}}>Update</button>))}</td>;
i have multiple postsOffCountry like consts but just with diffrent data.