Skip to content

mixins/dropdown.js - items[0].focus() is not a function #325

Closed
@kfrp

Description

@kfrp

Hello, great library!

Just wanted to bring to your attention that mixins/dropdown.js#L123 returns an array that contains a single Nodelist, instead of an array that contains nodes (as you wanted, by using the spread operator).

Either:
return Array.prototype.slice.call( this.$refs.menu.querySelectorAll(ITEM_SELECTOR) )

or

return [].concat.apply( [], this.$refs.menu.querySelectorAll(ITEM_SELECTOR) )

...would give you the items in array format.

Thank you for all the work!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions