<commit_before><template>
    <div class="{{wrapperClass}}">
        <a @click="loadPage('prev')"
             class="{{linkClass}} {{isOnFirstPage ? disabledClass : ''}}">
            <i :class="icons.prev"></i>
        </a>
        <select id="vuetable-pagination-dropdown" class="ui search dropdown" @change="selectPage($event)">
            <template v-for="n in totalPage">
                <option class="{{pageClass}}" value="{{n+1}}">
                    {{pageText}} {{n+1}}
                </option>
            </template>
        </select>
        <a @click="loadPage('next')"
             class="{{linkClass}} {{isOnLastPage ? disabledClass : ''}}">
            <i :class="icons.next"></i>
        </a>
    </div>
</template>

<script>
import PaginationMixin from './VuetablePaginationMixin.vue'

export default {
    mixins: [PaginationMixin],
    props: {
        'pageText': {
            type: String,
            default: function() {
                return 'Page'
            }
        }
    },
    methods: {
        loadPage: function(page) {
            // update dropdown value
            if (page == 'prev' && !this.isOnFirstPage) {
                this.setDropdownToPage(this.tablePagination.current_page-1)
            } else if (page == 'next' && !this.isOnLastPage) {
                this.setDropdownToPage(this.tablePagination.current_page+1)
            }

            this.$dispatch('vuetable-pagination:change-page', page)
        },
        setDropdownToPage: function(page) {
            this.$nextTick(function() {
                document.getElementById('vuetable-pagination-dropdown').value = page
            })
        },
        selectPage: function(event) {
            this.$dispatch('vuetable-pagination:change-page', event.target.selectedIndex+1)
        },
    },
    events: {
        'vuetable:load-success': function(tablePagination) {
            this.tablePagination = tablePagination
            this.setDropdownToPage(tablePagination.current_page)
        }
    }
}
</script><commit_msg>add dropdownClass prop<commit_after><template>
    <div class="{{wrapperClass}}">
        <a @click="loadPage('prev')"
             class="{{linkClass}} {{isOnFirstPage ? disabledClass : ''}}">
            <i :class="icons.prev"></i>
        </a>
        <select id="vuetable-pagination-dropdown" class="{{dropdownClass}}" @change="selectPage($event)">
            <template v-for="n in totalPage">
                <option class="{{pageClass}}" value="{{n+1}}">
                    {{pageText}} {{n+1}}
                </option>
            </template>
        </select>
        <a @click="loadPage('next')"
             class="{{linkClass}} {{isOnLastPage ? disabledClass : ''}}">
            <i :class="icons.next"></i>
        </a>
    </div>
</template>

<script>
import PaginationMixin from './VuetablePaginationMixin.vue'

export default {
    mixins: [PaginationMixin],
    props: {
        'dropdownClass': {
            type: String,
            default: function() {
                return 'ui search dropdown'
            }
        },
        'pageText': {
            type: String,
            default: function() {
                return 'Page'
            }
        }
    },
    methods: {
        loadPage: function(page) {
            // update dropdown value
            if (page == 'prev' && !this.isOnFirstPage) {
                this.setDropdownToPage(this.tablePagination.current_page-1)
            } else if (page == 'next' && !this.isOnLastPage) {
                this.setDropdownToPage(this.tablePagination.current_page+1)
            }

            this.$dispatch('vuetable-pagination:change-page', page)
        },
        setDropdownToPage: function(page) {
            this.$nextTick(function() {
                document.getElementById('vuetable-pagination-dropdown').value = page
            })
        },
        selectPage: function(event) {
            this.$dispatch('vuetable-pagination:change-page', event.target.selectedIndex+1)
        },
    },
    events: {
        'vuetable:load-success': function(tablePagination) {
            this.tablePagination = tablePagination
            this.setDropdownToPage(tablePagination.current_page)
        }
    }
}
</script>
{'fraction_non_alphanumeric': 0.14445970695970695, 'fraction_numerical': 0.0022893772893772895, 'mean_word_length': 1.7582070707070707, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3739720', 'n_tokens_mistral': 1245, 'n_tokens_neox': 1213, 'n_words': 190}