Skip to content
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

Fix some selectable functionality #1

Merged
merged 1 commit into from
Sep 2, 2019
Merged

Fix some selectable functionality #1

merged 1 commit into from
Sep 2, 2019

Conversation

tobyzerner
Copy link

@tobyzerner tobyzerner commented Aug 29, 2019

Fixing the issues I found in sagalbot#921 (comment)

@@ -7,35 +7,46 @@ export default {

watch: {
filteredOptions() {
this.typeAheadPointer = 0

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about this to find the first selectable index:

this.typeAheadPointer = this.filteredOptions.findIndex(option => this.selectable(option))

Haven't tested, but I think that'd work.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I did consider using findIndex, but I noticed that IE doesn't support it. Unless the transpilation process would automatically include a polyfill?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Waiting until this is resolved and then I will merge it)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tobyzerner good call! I just searched the dist, and it looks like I do have a reference to find() in there that's not polyfilled. I haven't heard any complaints there, but probably simpler to just leave it as is.

@doits doits merged commit 2a54205 into doits:disabled Sep 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants