diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-09-20 23:03:05 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-09-20 23:03:05 -0700 |
commit | 9238895c99c30c442ce8dae41b61f898a79dd89b (patch) | |
tree | 9488fa21fbcf6a78eefcf015ed73cd44e7415b97 /modern/src/EditCollectionView.js | |
parent | 37dd8129f8e07d00eb93262210bf1ecd4ce95532 (diff) | |
download | trackermap-web-9238895c99c30c442ce8dae41b61f898a79dd89b.tar.gz trackermap-web-9238895c99c30c442ce8dae41b61f898a79dd89b.tar.bz2 trackermap-web-9238895c99c30c442ce8dae41b61f898a79dd89b.zip |
Handle list refresh
Diffstat (limited to 'modern/src/EditCollectionView.js')
-rw-r--r-- | modern/src/EditCollectionView.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modern/src/EditCollectionView.js b/modern/src/EditCollectionView.js index 59ea2db0..bec10562 100644 --- a/modern/src/EditCollectionView.js +++ b/modern/src/EditCollectionView.js @@ -24,6 +24,7 @@ const EditCollectionView = ({ content, editPath, endpoint }) => { const [selectedId, setSelectedId] = useState(null); const [selectedAnchorEl, setSelectedAnchorEl] = useState(null); const [removeDialogShown, setRemoveDialogShown] = useState(false); + const [updateTimestamp, setUpdateTimestamp] = useState(Date.now()); const menuShow = (anchorId, itemId) => { setSelectedAnchorEl(anchorId); @@ -51,13 +52,14 @@ const EditCollectionView = ({ content, editPath, endpoint }) => { const handleRemoveResult = () => { setRemoveDialogShown(false); + setUpdateTimestamp(Date.now()); } const Content = content; return ( <> - <Content onMenuClick={menuShow} /> + <Content updateTimestamp={updateTimestamp} onMenuClick={menuShow} /> <Fab size="medium" color="primary" className={classes.fab} onClick={handleAdd}> <AddIcon /> </Fab> |