Skip to content

Instantly share code, notes, and snippets.

@Ateevduggal
Created June 11, 2022 05:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ateevduggal/deb428f497b718ab096435d00f399b56 to your computer and use it in GitHub Desktop.
Save Ateevduggal/deb428f497b718ab096435d00f399b56 to your computer and use it in GitHub Desktop.
{
currentData.map((data) => {
return (
<>
{toggle === data ? (
<EditRow
key={data.id}
tableData={tableData}
setTableData={setTableData}
Cancel={Cancel}
setEditData={setEditData}
editData={editData}
/>
) : (
<ReadOnly
key={data.id}
data={data}
Edit={Edit}
Delete={Delete}
/>
)}
</>
);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment