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.

customize innerSelector and arrowSelector in the Tooltip Class

See original GitHub issue

At https://github.com/FezVrasta/popper.js/blob/master/packages/tooltip/src/index.js there’s a initialization of the instance properties arrowSelector & innerSelector

 //
  // Defaults
  //
  arrowSelector = '.tooltip-arrow, .tooltip__arrow';
  innerSelector = '.tooltip-inner, .tooltip__inner';

but this values cannot be changed. Shouldn’t these values be accepted by the constructor to be able to customize them?

Something like…

export default class Tooltip {

  ...
  arrowSelector = '.tooltip-arrow, .tooltip__arrow';
  innerSelector = '.tooltip-inner, .tooltip__inner';

  constructor(reference, options) {
    ...
    if (options.arrowSelector) this.arrowSelector = options.arrowSelector
    if (options.innerSelector) this.innerSelector = arrowSelector.innerSelector
  }

}

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
clarfontheycommented, Jul 1, 2018

So, just want to clarify that I ran into this issue: is there a plan to release a new version of tooltip.js to NPM to include these changes? It kind of sucks that the web documentation doesn’t match what’s published.

0reactions
FezVrastacommented, Aug 28, 2018

Feel free to send a PR to update them.

Read more comments on GitHub >

github_iconTop Results From Across the Web

customize innerSelector and arrowSelector in the Tooltip Class
So, just want to clarify that I ran into this issue: is there a plan to release a new version of tooltip.js to...
Read more >
tooltip.js - UNPKG
n * The outermost wrapper element should have the `.tooltip` class. ... Defaults\n //\n arrowSelector = '.tooltip-arrow, .tooltip__arrow';\n innerSelector ...
Read more >
v-tooltip - npm
arrowSelector - CSS selector to get the arrow element in the tooltip template. innerSelector - CSS selector to get the inner content element ......
Read more >
v-tooltip - Awesome JS
Now uses Popper.js; You can now customize the tooltip template, ... Tooltip arrowSelector and innerSelector options (and corresponding global options).
Read more >
Styling the arrow on bootstrap tooltips - css - Stack Overflow
You can use this to change tooltip-arrow color .tooltip.bottom .tooltip-arrow { top: 0; left: 50%; margin-left: -5px; border-bottom-color: #000000; ...
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