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

Fix default values in fixtures app #250

Merged
merged 1 commit into from
Aug 14, 2024
Merged

Fix default values in fixtures app #250

merged 1 commit into from
Aug 14, 2024

Conversation

gregtyler
Copy link
Contributor

Purpose

Currently the values shown on screen are auto-filled based on the schema. This includes selecting the first value of enum dropdowns. But the data saved in the textarea (which is ultimately sent to the API) doesn't have these which can cause confusion.

#patch

Approach

To ensure alignment, after filling in default values save the new data back to the textarea so that it represents what's actually being displayed.

This makes the textarea slightly harder to edit manually, but no-one's doing that anyway.

This replaces the requestAnimationFrame fix which just caused different issues.

Currently the values shown on screen are auto-filled based on the schema. This includes selecting the first value of enum dropdowns. But the data saved in the textarea (which is ultimately sent to the API) doesn't have these which can cause confusion.

To ensure alignment, after filling in default values save the new data back to the textarea so that it represents what's actually being displayed.

This makes the textarea slightly harder to edit manually, but no-one's doing that anyway.

This replaces the `requestAnimationFrame` fix which just caused different issues.

#patch
@gregtyler gregtyler requested review from a team as code owners August 14, 2024 11:47
@gregtyler gregtyler merged commit 03748d2 into main Aug 14, 2024
23 checks passed
@gregtyler gregtyler deleted the fix-default-values branch August 14, 2024 12:01
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