Solution for Is there a way to auto fill in a material table row on the basis of data change in one row, using lookup in React?
is Given Below:
My client wants the data row to be auto filled based on the data change in one cell. Data should be taken from the database. Is there a way to do this in React.js using material table ? I am using node.js and react for entire project?
Do you mean that if you change the selected value(item name/item co), item price/sell price should change to its default values stored on your database?
If it is that the case, you can use useEffect hook (https://reactjs.org/docs/hooks-effect.html) and anytime that those values change, you can call to your api using fecth/axios (https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch), get the response and set them inside each input.