Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small fixes for deployment form logic #367

Merged
merged 5 commits into from
Mar 22, 2024
Merged

Conversation

annavik
Copy link
Member

@annavik annavik commented Mar 18, 2024

Includes three small fixes:

  • Cleanup logic for form data
  • Ignore selected values not matching available options in pickers
  • Do not treat data source as existing if no ID is set

Copy link

netlify bot commented Mar 18, 2024

Deploy Preview for ami-web canceled.

Name Link
🔨 Latest commit f954de4
🔍 Latest deploy log https://app.netlify.com/sites/ami-web/deploys/65fe116a94dcc300082db715

@@ -24,7 +25,7 @@ export const EntitiesPicker = ({
label: e.name,
}))}
showClear={false}
value={value}
value={hasValue ? value : undefined}
Copy link
Member Author

Choose a reason for hiding this comment

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

This is because I noticed if no data source is set, backend still sets a value for it. But in FE it looks a bit strange to show "empty string" as selected.

Screenshot 2024-03-18 at 22 53 04

Copy link
Member Author

Choose a reason for hiding this comment

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

So just a small unrelated fix to avoid this:
Screenshot 2024-03-18 at 23 20 01

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is because I noticed if no data source is set, backend still sets a value for it. But in FE it looks a bit strange to show "empty string" as selected.

Screenshot 2024-03-18 at 22 53 04

I fixed the bogus the data source! merging this PR, thank you.

Copy link

netlify bot commented Mar 18, 2024

Deploy Preview for ami-storybook canceled.

Name Link
🔨 Latest commit f954de4
🔍 Latest deploy log https://app.netlify.com/sites/ami-storybook/deploys/65fe116a1cd42b0008def9c7

@mihow mihow merged commit b78d229 into main Mar 22, 2024
5 checks passed
@mihow mihow deleted the fix/deployment-form-logic branch March 22, 2024 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants