Discarding changes should also refresh table data

This commit is contained in:
navaneeth 2021-09-01 22:13:13 +05:30
parent 8951f89792
commit 46cb7fd64a

View file

@ -501,7 +501,7 @@ export function Table({
] // Hack: need to fix
);
const data = useMemo(() => tableData, [tableData.length]);
const data = useMemo(() => tableData, [tableData.length, componentState.changeSet]);
const computedStyles = {
color,
@ -731,7 +731,7 @@ export function Table({
Save Changes
</button>
<button className="btn btn-light btn-sm mx-2" onClick={() => handleChangesDiscarded()}>
Cancel
Discard changes
</button>
</div>
)}