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(ui): populate default values in join related doc drawer #8791

Conversation

akhrarovsaid
Copy link
Contributor

@akhrarovsaid akhrarovsaid commented Oct 18, 2024

fixes #8612

I'm not convinced this was the cleanest way to solve this issue, however all other methods I tried induced an error in the form state builder or required larger, more laborious code changes.

@akhrarovsaid
Copy link
Contributor Author

As an aside: Before I began working on this fix, I occasionally received ERROR: Could not find field schema for given path "undefined" errors somewhat sporadically while playing with the Join field. The errors triggered from clicking the Create New button and it was impossible to predict when they would happen. I can't seem to consistently reproduce these errors and they seem unrelated to this PR.

@DanRibbens
Copy link
Contributor

As an aside: Before I began working on this fix, I occasionally received ERROR: Could not find field schema for given path "undefined" errors somewhat sporadically while playing with the Join field.

Probably need an optional chaining or early return in a hook during a render with missing props.

We have a few UI bugs with joins in our backlog. I hope to get some time this week for these.

@DanRibbens
Copy link
Contributor

This is blocked until the RSC refactor branch is complete. Thanks being patient, it's almost there.

@akhrarovsaid
Copy link
Contributor Author

Hey @DanRibbens,

In my testing the join related document drawer form gets populated with the correct default values as of the on-demand RSC merge. I don't think this is relevant anymore so I'll be closing this, thanks!

@DanRibbens
Copy link
Contributor

Thanks for testing @akhrarovsaid

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.

defaultValue is ignored when creating a doc from "Add new" on a join field.
2 participants