<commit_before><template>
    <table :class="['table',stripped?'table-striped':'',hover?'table-hover':'']">
        <thead>
        <tr>
            <th @click="headClick(field,key)"
                :class="[field.sortable?'sorting':null,sort===key?'sorting_'+(sortDesc?'desc':'asc'):'',field.class]"
                v-for="field,key in fields"
            >
                {{field.label}}
            </th>
        </tr>
        </thead>
        <tbody>
        <tr v-for="item in _items" :key="items_key" :class="[item.state?'table-'+item.state:null]">
            <td v-for="(field,key) in fields" :class="field.class">
                <slot :name="key" :value="item[key]" :item="item">{{item[key]}}</slot>
            </td>
        </tr>
        </tbody>
    </table>
</template>

<script>
    import Pagination from './pagination.vue';

    export default{
        components: {bPagination: Pagination},

        data() {
            return {
                sort: null,
                sortDesc: true
            };
        },

        props: {
            sortable: {
                type: Boolean,
                default: false
            },
            items: {
                type: Array,<commit_msg>made both field.class options into ternary operators to check if they exist. if not, output null<commit_after><template>
    <table :class="['table',stripped?'table-striped':'',hover?'table-hover':'']">
        <thead>
        <tr>
            <th @click="headClick(field,key)"
                :class="[field.sortable?'sorting':null,sort===key?'sorting_'+(sortDesc?'desc':'asc'):'',field.class?field.class:null]"
                v-for="field,key in fields"
            >
                {{field.label}}
            </th>
        </tr>
        </thead>
        <tbody>
        <tr v-for="item in _items" :key="items_key" :class="[item.state?'table-'+item.state:null]">
            <td v-for="(field,key) in fields" :class="[field.class?field.class:null]">
                <slot :name="key" :value="item[key]" :item="item">{{item[key]}}</slot>
            </td>
        </tr>
        </tbody>
    </table>
</template>

<script>
    import Pagination from './pagination.vue';

    export default{
        components: {bPagination: Pagination},

        data() {
            return {
                sort: null,
                sortDesc: true
            };
        },

        props: {
            sortable: {
                type: Boolean,
                default: false
            },
            items: {
                type: Array,
{'fraction_non_alphanumeric': 0.17157440125638004, 'fraction_numerical': 0.0, 'mean_word_length': 1.6376811594202898, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, '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': '2807192', 'n_tokens_mistral': 784, 'n_tokens_neox': 740, 'n_words': 136}