Created
March 1, 2021 21:44
-
-
Save nafeu/5ec3f49eb42e1caa16011df5316547fd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const [isRowLoading, setIsRowLoading] = useState({}); | |
const handleClickRow = async ({ id }) => { | |
setIsRowLoading({ [id]: true }); | |
const { data: childData } = await fetchChildData(); | |
setIsRowLoading({ [id]: false }) | |
if (tableData) { | |
const updatedTableData = recursivelyUpdateTable({ tableData, childData, id }); | |
setTableData(updatedTableData); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment