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 limitBy usable with decimal ranges #71

Merged
merged 2 commits into from
Jul 10, 2019
Merged

Make limitBy usable with decimal ranges #71

merged 2 commits into from
Jul 10, 2019

Conversation

Nfinished
Copy link
Contributor

The v-for directive can take a range to iterate through, like v-for="i in 10". This pull request allows limitBy to work with ranges by creating a 1-indexed array (as does the spec) to iterate through.

https://vuejs.org/v2/guide/list.html#v-for-with-a-Range

@freearhey
Copy link
Owner

Could you give at least one scenario of using this feature? Right now I don’t understand why you can’t just change the number in the "v-for" directive to something else.

@Nfinished
Copy link
Contributor Author

It's super useful in creating pagination elements without muddying your computed properties.

@freearhey freearhey changed the base branch from master to limitByRange July 10, 2019 15:55
@freearhey freearhey merged commit b2b53d2 into freearhey:limitByRange Jul 10, 2019
@freearhey
Copy link
Owner

Alright, I'll check everything and try to add this to the next update.

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

Successfully merging this pull request may close these issues.

None yet

2 participants