diff --git a/spiffworkflow-frontend/src/rjsf/custom_widgets/TypeaheadWidget/TypeaheadWidget.tsx b/spiffworkflow-frontend/src/rjsf/custom_widgets/TypeaheadWidget/TypeaheadWidget.tsx index 7ee9e073b..9931ddf1d 100644 --- a/spiffworkflow-frontend/src/rjsf/custom_widgets/TypeaheadWidget/TypeaheadWidget.tsx +++ b/spiffworkflow-frontend/src/rjsf/custom_widgets/TypeaheadWidget/TypeaheadWidget.tsx @@ -114,7 +114,15 @@ export default function TypeaheadWidget({ onInputChange={typeaheadSearch} onChange={(event: any) => { setSelectedItem(event.selectedItem); - onChange(JSON.stringify(event.selectedItem)); + let valueToUse = event.selectedItem; + + // if the value is not truthy then do not stringify it + // otherwise things like null becomes "null" + if (valueToUse) { + valueToUse = JSON.stringify(valueToUse); + } + + onChange(valueToUse); }} id={id} items={items}