Skip to content

Commit fef8475

Browse files
committed
only show indexes in the index flow
1 parent 7e6218c commit fef8475

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

packages/compass-indexes/src/components/create-index-form/create-index-form.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function CreateIndexForm({
8585
className={createIndexModalFieldsStyles}
8686
data-testid="create-index-form"
8787
>
88-
{showIndexesGuidanceVariant && (
88+
{showIndexesGuidanceVariant ? (
8989
<RadioBoxGroup
9090
aria-labelledby="index-flows"
9191
data-testid="create-index-form-flows"
@@ -103,12 +103,15 @@ function CreateIndexForm({
103103
Start with a Query
104104
</RadioBox>
105105
</RadioBoxGroup>
106+
) : (
107+
<Body weight="medium" className={indexFieldsHeaderStyles}>
108+
Index fields
109+
</Body>
106110
)}
107111

108-
<Body weight="medium" className={indexFieldsHeaderStyles}>
109-
Index fields
110-
</Body>
111-
{fields.length > 0 ? (
112+
{/* Only show the fields if user is in the Start with an index flow or if they're in the control */}
113+
{fields.length > 0 &&
114+
(showIndexesGuidanceVariant ? currentTab === 'IndexFlow' : true) ? (
112115
<CreateIndexFields
113116
schemaFields={schemaFieldNames}
114117
fields={fields}

0 commit comments

Comments
 (0)