Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

handleSelectChange doesn't work if the HTML in vue is accessing the data point being updated from the handle select change. #24

@codymurphyjones

Description

@codymurphyjones

<div v-if="selectedLength > 0" style="text-align: center;">Test</div>

methods: {
    handleSelectChange(rows) {
      this.selectedRequests = [].concat(rows);
      this.selectedLength = rows.length
    },
}
<v2-table
      :data="filterAndSortData(requests)"
      stripe
      :default-sort="{
        prop: 'timestamp',
        order: ascending ? 'ascending' : 'descending',
      }"
      :total="requests.length"
      :shown-pagination="true"
      :pagination-info="paginationInfo"
      :row-class-name="getRowClassName"
      @sort-change="handleSortChange"
      @page-change="handlePageChange"
      @select-change="handleSelectChange"
    >

I haven't be able to understand why, but if I remove the v-if="selectedLength > 0" then my check and uncheck on the boxes works perfectly fine.

however when I need to actually use the information being checked and unchecked, it seems like its basically freezing my app. I can't even use my sort by ascending/descending but as soon as I remove v-if="selectedLength" the problem resolves itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions