vuetify
vuetify copied to clipboard
feat(VPagination): Add page-data attribute to v-pagination
Description
Add page-data attribute to v-pagination
Motivation and Context
While hovering over pages, i need to know, what page i'm hovering (page changing while drag'n'drop).
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Improvement/refactoring (non-breaking change that doesn't add any features but makes things better)
Checklist:
- [x] The PR title is no longer than 64 characters.
- [x] The PR is submitted to the correct branch (
master
for bug fixes and documentation updates,dev
for new features and backwards compatible changes andnext
for non-backwards compatible changes). - [x] My code follows the code style of this project.
- [x] I've added relevant changes to the documentation (applies to new features and breaking changes in core library)
There may be a use-case for this, but it would need to support adding any data-
attribute. Couldn't you use the item slot and manually add it to the v-btn
?
<v-pagination>
<template #item="{ page, props }">
<v-btn :data-page="page" v-bind="props">{{ item.page }}</v-btn>
</template>
</v-pagination>
Yes, I can try that.
But what do you mean with "any data
- attribute"? Do you want to add custom data
attributes from item
based on some configuration?
data- attributes can be anything, and we wouldn't want to add more proprietary values such as data-test without some thought to it.
With that being said, the above should be sufficient for your use-case. If not, please report back.
This Pull Request is being closed due to inactivity.
If you have any additional questions, please reach out to us in our Discord community.