Skip to content

Commit a5f833f

Browse files
committed
disable create index button if fields are filled in for control
1 parent d3a0ee7 commit a5f833f

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

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

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,16 @@ function CreateIndexActions({
5050

5151
let isCreateIndexButtonDisabled = false;
5252

53-
if (showIndexesGuidanceVariant) {
54-
// Disable create index button if the user is in Query Flow and has no suggestions
55-
if (currentTab === 'QueryFlow') {
56-
if (indexSuggestions === null) {
57-
isCreateIndexButtonDisabled = true;
58-
}
53+
// Disable create index button if the user is in Query Flow and has no suggestions
54+
if (currentTab === 'QueryFlow') {
55+
if (indexSuggestions === null) {
56+
isCreateIndexButtonDisabled = true;
5957
}
60-
// Or if they are in the Index Flow but have not completed the fields
61-
else {
62-
if (!areAllFieldsFilledIn(fields)) {
63-
isCreateIndexButtonDisabled = true;
64-
}
58+
}
59+
// Or if they are in the Index Flow but have not completed the fields
60+
else {
61+
if (!areAllFieldsFilledIn(fields)) {
62+
isCreateIndexButtonDisabled = true;
6563
}
6664
}
6765

0 commit comments

Comments
 (0)