Skip to content

Commit 73649a0

Browse files
Ruben van LeeuwenDutchBen
authored andcommitted
2102: PR comments and radio buttons removed
1 parent 0c7ec24 commit 73649a0

File tree

3 files changed

+6
-20
lines changed

3 files changed

+6
-20
lines changed

apps/wfo-ui

Submodule wfo-ui updated 1 file

packages/orchestrator-ui-components/src/components/WfoPydanticForm/WfoPydanticForm.tsx

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ import {
3434
WfoLabel,
3535
WfoMultiCheckboxField,
3636
WfoObjectField,
37-
WfoRadio,
3837
WfoSummary,
3938
WfoText,
4039
WfoTextArea,
@@ -157,32 +156,19 @@ export const useWfoPydanticFormConfig = () => {
157156
return field.type === PydanticFormFieldType.BOOLEAN;
158157
},
159158
},
160-
{
161-
id: 'radio',
162-
ElementMatch: {
163-
Element: WfoRadio,
164-
isControlledElement: true,
165-
},
166-
matcher(field) {
167-
return (
168-
field.type === PydanticFormFieldType.STRING &&
169-
field.options.length > 0 &&
170-
field.options.length <= 3
171-
);
172-
},
173-
},
174159
{
175160
id: 'dropdown',
176161
ElementMatch: {
177162
Element: WfoDropdown,
178163
isControlledElement: true,
179164
},
180165
matcher(field) {
181-
// We are looking for a single value from a set list of options. With more than 3 options use a dropdown.
166+
// We are looking for a single value from a set list of options.
167+
// We are not using a radio button component to maintain being able to deselect options
182168
return (
183169
field.type === PydanticFormFieldType.STRING &&
184-
field.options.length > 0 &&
185-
field.options.length > 3
170+
Array.isArray(field.options) &&
171+
field.options.length > 0
186172
);
187173
},
188174
},

packages/orchestrator-ui-components/src/components/WfoPydanticForm/fields/WfoReactSelect/WfoReactSelect.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export const WfoReactSelect = <ValueType,>({
8888
options={options}
8989
value={selectedValue || null}
9090
isSearchable={true}
91-
isClearable={false}
91+
isClearable={true}
9292
placeholder={placeholder}
9393
isDisabled={disabled}
9494
components={{

0 commit comments

Comments
 (0)