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(core): check if previous state is null for unmounted CDR component #5724

Merged
merged 1 commit into from
Feb 29, 2024

Conversation

cngonzalez
Copy link
Member

@cngonzalez cngonzalez commented Feb 13, 2024

Description

When first arriving on a new document pane, any cross dataset references are shown as disabled. This is because it was getting caught in a check against previousId to catch an issue with useMemoObservable, which forced the useReferenceInfo to return a LOADING state indefinitely.

This PR conforms the useReferenceInfo function to check if the initial state of an _id is null (as it is on first mount), which is also done in the "vanilla" reference input, as seen here:

What to review

Any gotchas for this additional check.

Copy link

vercel bot commented Feb 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
performance-studio ✅ Ready (Inspect) Visit Preview Feb 27, 2024 3:13pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 27, 2024 3:13pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Feb 27, 2024 3:13pm

Copy link
Contributor

No changes to documentation

Copy link
Contributor

github-actions bot commented Feb 13, 2024

Component Testing Report Updated Feb 27, 2024 3:17 PM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 32s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 6s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 12s 3 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 13s 4 2 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 12s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 32s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 1s 15 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 4s 18 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 13s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 19s 9 0 0

Copy link
Member

@rexxars rexxars left a comment

Choose a reason for hiding this comment

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

LGTM!

@cngonzalez cngonzalez added this pull request to the merge queue Feb 29, 2024
Merged via the queue into next with commit 9ed5cca Feb 29, 2024
40 checks passed
@cngonzalez cngonzalez deleted the sdx-992 branch February 29, 2024 18:15
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