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

Make "index" available in "options"-slot within the list #1248

Closed
diffetruction opened this issue May 4, 2020 · 7 comments
Closed

Make "index" available in "options"-slot within the list #1248

diffetruction opened this issue May 4, 2020 · 7 comments

Comments

@diffetruction
Copy link

diffetruction commented May 4, 2020

Hey @shentao and team!

First up, thanks for this package. I like the usage of slots here! It makes it quite easy to modify the behavior the way you wish to.

I'd like to request having access to the index within the slot named "option".

You actually get the index in the surrounding <li> for loop, so I guess it should be a simple change from

<slot name="option" :option="option" :search="search">
  <span>{{ getOptionLabel(option) }}</span>
</slot>

to

<slot name="option" :option="option" :search="search"  :index="index">
  <span>{{ getOptionLabel(option) }}</span>
</slot>

Is there an argument against it?

I'd offer to create a PR for that.

Cheers and thanks again.

@shentao
Copy link
Owner

shentao commented May 4, 2020

Hey! That sounds like a good idea. I don’t think there is anything preventing that change. Feel free to open a PR. Though be warned, it might take a few weeks before I will be able to release it... Lately, I’m a bit behind on this project.

@diffetruction
Copy link
Author

@shentao I am glad that you like the idea.

I'd like to work on the project, but in relation to this issue: #1241 and some linting errors during npm run dev, I can't get the dev environment to work properly.

I'll try to resolve the issues during the weekend, if there is no quick fix on your part. Hopefully I can commit something useful :).

Nonetheless, thank you again for taking the time.

@shentao
Copy link
Owner

shentao commented May 5, 2020

That would be great! The issues most likely come from automatic updating the dependencies (had to disable the dependabot as it turns out, even minor updates can cause breaking changes...).

@diffetruction
Copy link
Author

Hey again @shentao. I am trying to fix the dev env with this PR #1251. If this looks good to you, I would create another PR for this topic on the basis of that commit :).

@shentao
Copy link
Owner

shentao commented May 5, 2020

Reviewed – looks great! Really appreciate the help!

@diffetruction
Copy link
Author

I am happy to be of use here :). I'd gladly support you further on this project as much as I can. Another PR for this ticket here will follow soon.

@shentao
Copy link
Owner

shentao commented May 5, 2020

This sounds like a spark of hope for the project! 🤞 Thank you! Happy to have someone on board to help with the maintenance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants