Skip to content
This repository was archived by the owner on Apr 2, 2024. It is now read-only.

SelectField - Converts undefined to null #266

Merged
merged 1 commit into from
Jan 25, 2024
Merged

Conversation

ricardovdheijden
Copy link
Contributor

In case of a modify flow we need to send the removal of a value to the backend. Before this change, it meant the value changes to undefined. However, undefined won't get sent to the backend (and backend does not allow a value to be undefined.

In case the value becomes undefined by clicking on the X on the select field, we change this value to null

Unfortunately ts-ignore is needed since onChange does not allow null as value.

Copy link
Contributor

@mrijk mrijk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mrijk mrijk merged commit a748ae9 into main Jan 25, 2024
4 checks passed
@ricardovdheijden ricardovdheijden deleted the select-field-empty-fix branch January 25, 2024 14:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants