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

Render modal even if its not open #79

Merged
merged 1 commit into from
Jan 31, 2024
Merged

Conversation

Flo0807
Copy link
Collaborator

@Flo0807 Flo0807 commented Jan 31, 2024

We had some strange behaviour in the HasManyThrough field that caused the linked values to reset when other form elements changed. This was the result of a change where we prevent the entire modal markup from rendering if it is not open. The way the HasManyThrough field currently works is that it stores the current state in the form inputs of the modal. This means that the modal markup has to be rendered even if if the modal is not open.

To prevent the Live View from crashing when certain keys are pressed when the modal is closed, we now conditionally assign these events based on the open state of the modal.

We should address this when reworking the HasManyThrough field.

@Flo0807 Flo0807 merged commit 82f0756 into develop Jan 31, 2024
1 check passed
@Flo0807 Flo0807 deleted the feature/fix-has-many-through branch January 31, 2024 09:59
@Flo0807 Flo0807 added the bug Something isn't working label Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant