Replies: 1 comment
-
That's a tricky situation. One alternative I can think of is to make the moving of the node happen with a method, or some reactive property, and trigger that from the React side with an on mount effect. e.g. https://stackblitz.com/edit/nextjs-nvhmej?file=app%2Fpage.tsx,lib%2Flit%2Fdropdown.ts,lib%2Freact%2Fdropdown.tsx |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey, we are using a custom dropdown lit component in nextJS. We will be providing the data to dropdown in default slot. This default slot contents will be appended to body when dropdown is opened to overcome stacking context issue. This works fine as expected.
But when the users want the dropdown to open on load itself, we will be doing the same dom manipulation on firstUpdated and it is throwing hydration errors.
We are using custom-wrapper to pass the attribute values to the server ----- #3418
I have recreated the scenario in stackblitz.
Any help will be appreciated. :)
Beta Was this translation helpful? Give feedback.
All reactions