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

initOptions with be cover by contentAction's option #6

Closed
koory1st opened this issue Feb 6, 2021 · 1 comment · Fixed by #8
Closed

initOptions with be cover by contentAction's option #6

koory1st opened this issue Feb 6, 2021 · 1 comment · Fixed by #8
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@koory1st
Copy link

koory1st commented Feb 6, 2021

I want to use svelte-popperjs like this.

<script>
  import { createPopperActions } from 'svelte-popperjs';
  const [popperRef, popperContent] = createPopperActions({
    placement: 'bottom-start',
  });

  const popperOptions = {
    modifiers: [
      { name: 'offset', options: { offset: [0, 8] } }
    ],
  };

  let showTooltip = false;
</script>

<button
  use:popperRef
  on:mouseenter={() => showTooltip = true}
  on:mouseleave={() => showTooltip = false}
>
  My button
</button>
{#if showTooltip}
  <div id="tooltip" use:popperContent={popperOptions}>
    My tooltip
    <div id="arrow" data-popper-arrow />
  </div>
{/if}

But the options I got is just
{ modifiers: [ { name: 'offset', options: { offset: [0, 8] } } ], }
With out
{ placement: 'bottom-start', }

I think it will better to combine this two options together.

@bryanmylee bryanmylee added the bug Something isn't working label Feb 24, 2021
@bryanmylee bryanmylee self-assigned this Feb 24, 2021
@bryanmylee bryanmylee linked a pull request Feb 24, 2021 that will close this issue
@bryanmylee bryanmylee added the enhancement New feature or request label Feb 24, 2021
@bryanmylee
Copy link
Owner

bryanmylee commented Feb 24, 2021

@koory1st This should be fixed in the latest release v1.2.2.

Let me know if you’re facing any further issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants