[enter image description here][1]
[1]: https://i.stack.imgur.com/kjrm8.png
I want to change the background color of the grid rows when I enter a sequence number in the input below.
I am storing grid data in tableData. I have used the filter to get only one data value, but I can't add a background color. I want to add a background color to only one row when the number changes, how can I do that?
const [select, setSelect] = useState("");
const numSelect = tableData.filter((rows) => rows.SEQ == select);
// const numSelect = tableData.filter((rows,index) => index +1 == select);
<tbody>
{tableData?.map((el, i) => (
<tr key={i}>
<td>{el.SEQ}</td>
<td>{el.PROD_CODE}</td>
<td>{el.GRADE}</td>
<td>{el.QTY}</td>
<td>{el.PRODDAT}</td>
<td>{el.JPSTSNAME}</td>
<td>{el.OWNNAME}</td>
<td>{el.COLORNAME}</td>
<td>{el.JPSPEC}</td>
</tr>
))}
</tbody>