-
Notifications
You must be signed in to change notification settings - Fork 229
Added disablePaginationNavigation setting #70
Conversation
+1 |
You may notice that the first result page of google search does not have |
That's why I am not going to merge your PR... |
But you can make your forked repo a npm package, such as |
Well that's a design choice that google made, for my project I do require to show them. I understand that not everyone wants to show them like that, that's why I made it optional. I did notice that I accidentally enabled it by default, but I could change that back to false. What's wrong with giving the users of your package options? |
There are already too many props pal... |
I know there's a couple props, I've seen it when I added the the disablePaginationNavigation prop. Anyway, personally I don't see the problem with an extra prop especially since it's not required. Like I said, all it does is give the users of this package more control over how they'd like to show the dataTable. Also please note that the original dataTables does show the prev and next buttons. |
Workaround: <template>
<div>
<code>query: {{ query }}</code>
<datatable v-bind="$data" />
</div>
</template>
<script>
import mockData from '../_mockData'
export default {
data: () => ({
columns: [
{ title: 'User ID', field: 'uid', sortable: true },
{ title: 'Username', field: 'name' },
{ title: 'Age', field: 'age', sortable: true },
{ title: 'Email', field: 'email' },
{ title: 'Country', field: 'country' }
],
data: [],
total: 0,
query: {}
}),
watch: {
query: {
handler (query) {
mockData(query).then(({ rows, total }) => {
this.data = rows
this.total = total
// you are welcome!
this.$nextTick(() => {
$(this.$el)
.find('a.page-link')
.find('.fa-arrow-left, .fa-arrow-right')
.closest('li.page-item')
.remove()
})
})
},
deep: true
}
}
}
</script> |
I'm a bit confused; your example completely removes the next and prev buttons, which is the complete opposite of what I wanted. I want the buttons to be always visible, but in a disabled state when not clickable. Edit: |
Hey dude, you don't need to waste too much time on it as it's not worth it. |
I just want to keep this repo as simple as it can. |
Thanks for your reaction @kenberkeley! Unfortunately copying and editing the code would mean that we loose compatibility with this original project, which is not what we want. One of the main reasons of using 3rd party plugins is also that if there are issues or something that those will probably be fixed by someone else. Anyway, thanks for your attention to this issue. If you ever change your mind about this feature please let me know :) |
A fix for #68
Please let me know if you'd like me to change something before it's good enough to merge.
Thanks!