Skip to content

Target property types not explained #5262

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

Closed
1 of 4 tasks
h4gen opened this issue Apr 27, 2020 · 2 comments · Fixed by #5306
Closed
1 of 4 tasks

Target property types not explained #5262

h4gen opened this issue Apr 27, 2020 · 2 comments · Fixed by #5306

Comments

@h4gen
Copy link

h4gen commented Apr 27, 2020

Documentation issue

  • Reporting a typo
  • Reporting a documentation bug
  • Documentation improvement
  • Documentation feedback

Specific page of the documentation:

Tooltips and everything with a target property

Additional context or description

The pages of components with target property state String or HTMLElement or SVGElement or Function or Object as valid target but there are no examples given besides the option for String in the docs. Would be great to see examples how to access a target by HTMLElement or SVGElement or Function or Object in Vue.

Thank you.

@Hiws
Copy link
Member

Hiws commented Apr 27, 2020

There's actually an example of using a function (sort of).
The last <b-tooltip> in this snippet, uses both a shorthand function and a ref to return a HTMLElement.

But i agree, that maybe a dedicated section to various ways to target could be beneficial, besides a string with the ID of an element.

For now I've created this codepen with a few examples.
https://codepen.io/Hiws/pen/vYNmvqV

Note that $refs can actually return different types.
If it's placed on a b-btn it will return a HTMLElement, if you place it on a b-datepicker it will return an Object and if you place it on a b-icon it will return a SVGElement.

So in the codepen, all these types should be covered.

@h4gen
Copy link
Author

h4gen commented Apr 28, 2020

Thank you very much for this reply. Indeed this explanation helped me personally a lot. And thanks for the great examples :)

jacobmllr95 added a commit that referenced this issue May 6, 2020
…itional popover/tooltip docs updates (closes #5262) (#5306)

* chore: add dedicated documentation for `v-b-toggle` directive

* Update nuxt.config.js

* Update package.json

* Update index.js

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update package.json

* Update README.md

* Update package.json

* Update README.md

Co-authored-by: Jacob Müller <jacob.mueller.elz@gmail.com>
@tmorehouse tmorehouse added the Status: Fixed / Implemented Issue fixed by a new release label May 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants