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

Refactor drawer breakpoint methods #238

Merged
merged 5 commits into from Jul 7, 2020

Conversation

sebnitu
Copy link
Owner

@sebnitu sebnitu commented Jul 7, 2020

Problem

Drawer breakpoints are currently stored as an array in the returned api mediaQueryLists as HTML elements. This breaks the breakpoint queries in the instances where the DOM is updated via AJAX or other DOM manipulation tools such as React or LiveView.

Solution

This PR refactors the way media query lists are saved by saving the drawer key instead of the HTML element. Now the HTML lookup is done using the key after a breakpoint is matched and filtered.

@sebnitu sebnitu merged commit 50b4d9f into master Jul 7, 2020
@sebnitu sebnitu deleted the refactor-drawer-breakpoint-methods branch July 7, 2020 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant