Skip to content

Commit

Permalink
disable tree context menu item based on the loading status
Browse files Browse the repository at this point in the history
Signed-off-by: ryjiang <[email protected]>
  • Loading branch information
shanghaikid committed Sep 27, 2024
1 parent 5b25363 commit 0e05bb6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/src/pages/databases/tree/TreeContextMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export const TreeContextMenu = (props: {
<>
<MenuItem
className={classes.menuItem}
disabled={(contextMenu.object as CollectionObject).loaded}
onClick={() => {
setDialog({
open: true,
Expand All @@ -85,6 +86,7 @@ export const TreeContextMenu = (props: {
</MenuItem>
<MenuItem
className={classes.menuItem}
disabled={!(contextMenu.object as CollectionObject).loaded}
onClick={() => {
setDialog({
open: true,
Expand Down

0 comments on commit 0e05bb6

Please sign in to comment.