Skip to content

Commit 716fbba

Browse files
authored
Only show message to stop instance when instance has been selected (#2962)
* Update logic for message display re: stopping the instance * Article update: *This* instance …
1 parent e464bde commit 716fbba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/forms/anti-affinity-group-member-add.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ export default function AddAntiAffinityGroupMemberForm({ instances, onDismiss }:
7777
control={form.control}
7878
/>
7979
</form>
80-
{!canAddInstance && (
80+
{selectedInstance && !canAddInstance && (
8181
<Message
8282
variant="notice"
83-
content="An instance must be stopped to add it to a group"
83+
content="This instance must be stopped to add it to a group"
8484
/>
8585
)}
8686
</Modal.Section>
@@ -89,7 +89,7 @@ export default function AddAntiAffinityGroupMemberForm({ instances, onDismiss }:
8989
onDismiss={onDismiss}
9090
actionText="Add to group"
9191
formId={formId}
92-
disabled={!canAddInstance}
92+
disabled={!selectedInstance || !canAddInstance}
9393
/>
9494
</Modal>
9595
)

0 commit comments

Comments
 (0)