mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-02-17 01:36:57 +00:00
Fix show/hide delete button
This commit is contained in:
parent
91633ee85c
commit
c4b659cdf7
@ -258,7 +258,7 @@ const DocumentsTabComponent: React.FunctionComponent<{
|
||||
case ViewModels.DocumentExplorerState.exisitingDocumentNoEdits:
|
||||
case ViewModels.DocumentExplorerState.exisitingDocumentDirtyInvalid:
|
||||
case ViewModels.DocumentExplorerState.exisitingDocumentDirtyValid:
|
||||
return true;
|
||||
return selectedRows.size > 0;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
@ -329,7 +329,7 @@ const DocumentsTabComponent: React.FunctionComponent<{
|
||||
}, []);
|
||||
|
||||
// If editor state changes, update the nav
|
||||
// TODO Put whatever the buttons callback use in the dependency array
|
||||
// TODO Put whatever the buttons callback use in the dependency array: find a better way to maintain
|
||||
useEffect(
|
||||
() => updateNavbarWithTabsButtons(),
|
||||
[editorState, selectedDocumentContent, initialDocumentContent, selectedRows, documentIds],
|
||||
|
Loading…
x
Reference in New Issue
Block a user