question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot use tooltip's option placement with function ???

See original GitHub issue

I use webpack 4 with two package: “popper.js”: “^1.14.3” “tooltip.js”: “^1.2.0”

I have config tooltip with option:

new Tooltip(document.getElementById('ttip'),{
  html: true,
  placement: 'left',
  title () {
    return this.dataset.ttipTitle
  }
})

It work fine. But i try change placement with function

new Tooltip(document.getElementById('ttip'),{
  html: true,
  placement () {
    return 'left'
  },
  title () {
    return this.dataset.ttipTitle
  }
})

It have error

Uncaught TypeError: placement.indexOf is not a function

I don’t know why. Please help me fix it !

Thank you !

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
piglovesyoucommented, Jul 28, 2018

@FezVrasta So all the PlacementFunction in the source code are supposed to be deleted? I’ll take care of it.

1reaction
FezVrastacommented, Jul 23, 2018

The documentation is wrong, I’m sorry. We need to update it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot use tooltip's option placement with function ??? #654
I use webpack 4 with two package: "popper.js": "^1.14.3" "tooltip.js": "^1.2.0". I have config tooltip with option: new Tooltip(document.
Read more >
Tooltips and Popovers not working in Bootstrap 5
I created 2 buttons at the bottom of the page using "tooltips" and "popovers" but they don't work, nothing is displayed. Here is...
Read more >
Tooltips · Bootstrap v5.0
When auto is specified, it will dynamically reorient the tooltip. When a function is used to determine the placement, it is called with...
Read more >
Bootstrap Tooltip Placement - WOWSlider.com
The tooltip plugin generates information and markup as needed, and by default places tooltips after their trigger element. Set off the tooltip by...
Read more >
Overlays | React-Bootstrap
A set of components for positioning beautiful overlays, tooltips, popovers, ... Pro Tip: Using the function form of OverlayTrigger avoids a React.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found