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

Slot props are not rendering as expected #266

Open
sureshjoshi opened this issue Apr 14, 2023 · 0 comments
Open

Slot props are not rendering as expected #266

sureshjoshi opened this issue Apr 14, 2023 · 0 comments

Comments

@sureshjoshi
Copy link

sureshjoshi commented Apr 14, 2023

I'm not sure if I'm doing this correctly, but here is my component:

  const describedby = writable();
  const { container } = render(
    html`
    <${DescriptionProvider} name={"test"} let:describedby=${describedby}>
      <div aria-describedby=${describedby}>
        <${Description}>I am a description</${Description}>
        <span>Contents</span>
      </div>
    </${DescriptionProvider}>`
  );

And the snapshot that generates has <div aria-describedby=[Object object]>, but if I'm using a standalone component, then it would render a string headlessui-description-1.

I've tried using a get on the store, but I think that's a greedy get, so it's blank.

Am I handling the slot props incorrectly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant