preline icon indicating copy to clipboard operation
preline copied to clipboard

data-hs-combo-box-output-item attribute hydration issues

Open bluefire2121 opened this issue 1 year ago • 2 comments

Summary

data-hs-combo-box-output-item attribute adds a style attribute to its element which causes hydration issues.

Steps to Reproduce

  1. Follow the basic example for combobox
  2. Hydration issues occur when used with SSR frameworks (Next / Remix) on the element with the data-hs-combo-box-output-item.
  3. Client contains style={{display: "block"}}. Server does not.

Demo Link

https://preline.co/docs/combobox.html

Expected Behavior

  • No hydration errors.
  • Style attribute isn't added. Either use the Tailwindcss class hidden or remove style altogether.

Actual Behavior

  • Hydration issues occur

Screenshots

Screenshot 2024-06-02 171233

bluefire2121 avatar Jun 03 '24 00:06 bluefire2121

The work around is to add style={{display: 'block'}} to elements that contain the data-hs-combo-box-output-item attribute.

bluefire2121 avatar Jun 03 '24 00:06 bluefire2121

Summary

data-hs-combo-box-output-item attribute adds a style attribute to its element which causes hydration issues.

Steps to Reproduce

  1. Follow the basic example for combobox
  2. Hydration issues occur when used with SSR frameworks (Next / Remix) on the element with the data-hs-combo-box-output-item.
  3. Client contains style={{display: "block"}}. Server does not.

Demo Link

https://preline.co/docs/combobox.html

Expected Behavior

  • No hydration errors.
  • Style attribute isn't added. Either use the Tailwindcss class hidden or remove style altogether.

Actual Behavior

  • Hydration issues occur

Screenshots

Screenshot 2024-06-02 171233

Hey @bluefire2121, Could you please provide a Stacklblitz demo? Please note, the demo link should not be our docs link. Thanks!

olegpix avatar Jun 03 '24 09:06 olegpix