Git Product home page Git Product logo

Comments (6)

RobinMalfait avatar RobinMalfait commented on July 22, 2024 1

@jussirantala the anchor prop has an implicit portal={true} behind the scenes. Both with and without a portal it works as expected for me.

Can you create a minimal reproduction repo and share it here so that I can take a look?

from headlessui.

jussirantala avatar jussirantala commented on July 22, 2024 1

I got it working, thanks for the fix!

from headlessui.

RobinMalfait avatar RobinMalfait commented on July 22, 2024

Hey!

This should be fixed by #3250, and will be available in the next release.

You can already try it using:

  • npm install @headlessui/react@insiders.

from headlessui.

jussirantala avatar jussirantala commented on July 22, 2024

Hey!

This should be fixed by #3250, and will be available in the next release.

You can already try it using:

  • npm install @headlessui/react@insiders.

@RobinMalfait I tried 0.0.0-insiders.f5ac361 and it still happens 🤔I tried to delete node_modules in case it's a cache issue or something and checked I have that version there.

image

I'm thinking if you instead should fix the props merging functions to support object props and merging of them. You use mergePropsAdvanced in Portal for example. Now it just replaces theirProps.style with ourProps.style instead of merging them.

from headlessui.

RobinMalfait avatar RobinMalfait commented on July 22, 2024

Hmm, if you are using Next.js for example, make sure to also drop the .next folder since it contains caches.

They should be merged correctly:

image image

We could merge it in the props merging logic, but this gives us a bit more control on a per component basis. We could still do that, but I think something else is going on.

from headlessui.

jussirantala avatar jussirantala commented on July 22, 2024

Hmm, if you are using Next.js for example, make sure to also drop the .next folder since it contains caches.

They should be merged correctly:

image image
We could merge it in the props merging logic, but this gives us a bit more control on a per component basis. We could still do that, but I think something else is going on.

@RobinMalfait

We don't use next.js.

Could you try with portal=true?

from headlessui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.