Skip to content

Adding multiple relationships doesn't reset modal form and clears form events. #118

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

Closed
richardvanbergen opened this issue Mar 30, 2021 · 4 comments

Comments

@richardvanbergen
Copy link

Bug Report

There's a couple of wonky behaviours around rich text relationships. I think they're related so I'm putting them as one issue.

It seems to be that if you add a relationship, select somewhere else, and add another relationship:

  1. The form is still populated with the previous values.
  2. The events that fetch the relationships are no longer bound to the select box.
  3. The "Add relationship" button submits the main form rather than inserting a new relationship inline.

It's hard to explain so I've included a screen recording.

screen.recording.mov

Steps to Reproduce

  1. enableRichTextRelationship on a couple of different modules.
  2. Try to insert a relationship, should be OK
  3. Try to insert another.
  4. See issues described above.
@jmikrut
Copy link
Member

jmikrut commented Mar 31, 2021

Hey @richardvanbergen — thank you for this. We have fixes applied to issues 1 and 2, but 3 we are still working on.

Going to continue to chase it down. It has to do with an inner working of React concerning event bubbling out of Portals:

facebook/react#11387

facebook/react#19637

Wild stuff. Will report back shortly as now that we have identified the issue, we will likely be able to implement a workaround and get all 3 issues fixed at once!

@richardvanbergen
Copy link
Author

It's ok I understand how sometimes it can be weird esoteric interactions with the core framework. I've had plenty of those myself 😅

@jmikrut
Copy link
Member

jmikrut commented Mar 31, 2021

This has all been resolved in #120! Deploying 0.5.2 as we speak!

@jmikrut jmikrut closed this as completed Mar 31, 2021
Copy link
Contributor

github-actions bot commented Sep 8, 2024

This issue has been automatically locked.
Please open a new issue if this issue persists with any additional detail.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants