File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -85,15 +85,10 @@ const CollectionHeaderActions: React.FunctionComponent<
8585 atlasMetadata && // Only show in Atlas
8686 ! isReadonly && // Don't show for readonly collections (views)
8787 ! sourceName ; // sourceName indicates it's a view
88+ // TODO: CLOUDP-337090: also filter out overly nested collections
8889
8990 const hasData = true ; // TODO: CLOUDP-337090
9091
91- // Determine if button should be enabled or disabled with tooltip
92- const isMockDataButtonEnabled = hasData ; // TODO: CLOUDP-337090: also filter out overly nested collections
93- const disabledTooltipText = ! hasData
94- ? 'Please add data to your collection to generate similar mock documents'
95- : undefined ;
96-
9792 return (
9893 < div
9994 className = { collectionHeaderActionsStyles }
@@ -116,13 +111,13 @@ const CollectionHeaderActions: React.FunctionComponent<
116111 ) }
117112 { shouldShowMockDataButton && (
118113 < Tooltip
119- enabled = { ! isMockDataButtonEnabled && ! ! disabledTooltipText }
114+ enabled = { ! hasData }
120115 trigger = {
121116 < div >
122117 < Button
123118 data-testid = "collection-header-generate-mock-data"
124119 size = { ButtonSize . Small }
125- disabled = { ! isMockDataButtonEnabled }
120+ disabled = { ! hasData }
126121 onClick = { onOpenMockDataModal }
127122 leftGlyph = { < Icon glyph = "Sparkle" /> }
128123 >
@@ -131,7 +126,7 @@ const CollectionHeaderActions: React.FunctionComponent<
131126 </ div >
132127 }
133128 >
134- { disabledTooltipText }
129+ Please add data to your collection to generate similar mock documents
135130 </ Tooltip >
136131 ) }
137132 { atlasMetadata && (
You can’t perform that action at this time.
0 commit comments