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

Titlebar: not possible to set active using an element #390

Closed
c-frater opened this Issue Mar 21, 2017 · 0 comments

Comments

Projects
None yet
2 participants
@c-frater
Copy link
Contributor

c-frater commented Mar 21, 2017

Context

For a given link, it is not possible to set directly using the element, instead it expects a number or an ID selector

Expected Behavior

hx.titlebar.active(selection) should set the active link to the selection (assuming it exists in the titlebar)

Actual Behavior

It throws an error as selection.node(id) is called with the passed in selection

Steps to Reproduce

On https://www.hexagonjs.io/docs/titlebar/

const sel = hx.select('.example-heading')
sel.api().active(sel.selectAll('.hx-titlebar-link').node(2))

Workaround

Add an ID to the node and use:

hx.titlebar.active('#' + selection.attr('id'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment