Skip to content

Commit 5826fe3

Browse files
ACM-12772 Fix form match expressions required fields (stolostron#3668)
* Update to @patternfly-labs/react-form-wizard@1.32.0 Signed-off-by: Kevin Cormier <kcormier@redhat.com> * Revert "Remove required for AppSet labels (stolostron#3601)" This reverts commit 3e4f63e. Signed-off-by: Kevin Cormier <kcormier@redhat.com> --------- Signed-off-by: Kevin Cormier <kcormier@redhat.com>
1 parent 35100b2 commit 5826fe3

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

frontend/package-lock.json

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"@octokit/types": "6.40.0",
4747
"@openshift-assisted/locales": "2.11.2-cim",
4848
"@openshift-assisted/ui-lib": "2.11.2-cim",
49-
"@patternfly-labs/react-form-wizard": "^1.30.0",
49+
"@patternfly-labs/react-form-wizard": "^1.32.0",
5050
"@patternfly/patternfly": "4.196.7",
5151
"@patternfly/react-charts": "^6.74.3",
5252
"@patternfly/react-code-editor": "4.65.1",

frontend/src/wizards/Placement/MatchExpression.tsx

+5
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,14 @@ export function MatchExpression(props: { labelValuesMap?: Record<string, string[
2828
path="key"
2929
options={Object.keys(labelValuesMap)}
3030
isCreatable
31+
required
3132
onValueChange={(_value, item) => set(item as object, 'values', [])}
3233
/>
3334
) : (
3435
<WizTextInput
3536
label={t('Label')}
3637
path="key"
38+
required
3739
onValueChange={(_value, item) => set(item as object, 'values', [])}
3840
/>
3941
)}
@@ -46,6 +48,7 @@ export function MatchExpression(props: { labelValuesMap?: Record<string, string[
4648
{ label: t('exists'), value: 'Exists' },
4749
{ label: t('does not exist'), value: 'DoesNotExist' },
4850
]}
51+
required
4952
onValueChange={(value, item) => {
5053
switch (value) {
5154
case 'Exists':
@@ -66,6 +69,7 @@ export function MatchExpression(props: { labelValuesMap?: Record<string, string[
6669
placeholder={t('Select the values')}
6770
path="values"
6871
isCreatable
72+
required
6973
hidden={(labelSelector) => !['In', 'NotIn'].includes(labelSelector?.operator)}
7074
options={values}
7175
/>
@@ -76,6 +80,7 @@ export function MatchExpression(props: { labelValuesMap?: Record<string, string[
7680
<WizStringsInput
7781
label={t('Values')}
7882
path="values"
83+
required
7984
hidden={(labelSelector) => !['In', 'NotIn'].includes(labelSelector?.operator)}
8085
/>
8186
)}

0 commit comments

Comments
 (0)