Skip to content

Commit 1f1669f

Browse files
feat(ui): add support for when to config groups (#3055)
* add support for when to config group * f
1 parent 1b42d91 commit 1f1669f

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

e2e/kots-release-install-v3/config.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,3 +545,35 @@ spec:
545545
---
546546
547547
This line contains a <u>custom underline</u> using raw HTML.
548+
549+
- name: conditional-group-settings
550+
title: Conditional Group Settings
551+
items:
552+
- name: enable_advanced_features
553+
title: Enable Advanced Features
554+
type: bool
555+
default: "0"
556+
help_text: "Toggle this to show/hide the Advanced Features tab"
557+
558+
- name: advanced-features
559+
title: Advanced Features
560+
when: '{{repl ConfigOptionEquals "enable_advanced_features" "1"}}'
561+
description: |
562+
This group demonstrates conditional group display using the `when` property.
563+
564+
This tab only appears when "Enable Advanced Features" is checked in the "Conditional Group Settings" tab.
565+
items:
566+
- name: advanced_text_option
567+
title: Advanced Text Option
568+
type: text
569+
help_text: "This field is only visible when advanced features are enabled"
570+
571+
- name: advanced_textarea_option
572+
title: Advanced Textarea Option
573+
type: textarea
574+
help_text: "This textarea is only visible when advanced features are enabled"
575+
576+
- name: advanced_checkbox_option
577+
title: Advanced Checkbox Option
578+
type: bool
579+
help_text: "This checkbox is only visible when advanced features are enabled"

web/src/types/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ export interface AppConfigGroup {
111111
name: string;
112112
title: string;
113113
description?: string;
114+
when?: string;
114115
items: AppConfigItem[];
115116
}
116117

0 commit comments

Comments
 (0)