Skip to content

Commit

Permalink
Close #1164 disable selecting row on checkbox click
Browse files Browse the repository at this point in the history
  • Loading branch information
jtommy committed Jan 11, 2019
1 parent ba74700 commit 3bbc5ef
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -10,6 +10,7 @@
* Add ``contextmenu`` event to table (thanks @gps-dev)
* Add ``show-detail-icon`` prop to table and toggle row detail programmatically (thanks @omer2500)
* Add ``use-html5-validation`` prop to form components and ``defaultUseHtml5Validation`` constructor options (thanks @lukio3)
* #1164 Disable selecting row on checkbox click when table is ``checkable``

### Fixes

Expand Down
11 changes: 9 additions & 2 deletions src/components/table/Table.vue
Expand Up @@ -26,8 +26,7 @@
@change.native="checkAll"/>
</th>
<th
v-for="(column, index) in newColumns"
v-if="column.visible || column.visible === undefined"
v-for="(column, index) in visibleColumns"
:key="index"
:class="{
'is-current-sort': currentSortColumn === column,
Expand Down Expand Up @@ -93,6 +92,7 @@
:disabled="!isRowCheckable(row)"
:value="isRowChecked(row)"
@change.native="checkRow(row)"
@click.native.stop
/>
</td>

Expand Down Expand Up @@ -323,6 +323,13 @@
}
},
visibleColumns() {
if (!this.newColumns) return this.newColumns
return this.newColumns.filter((column) => {
return column.visible || column.visible === undefined
})
},
/**
* Check if all rows in the page are checked.
*/
Expand Down

0 comments on commit 3bbc5ef

Please sign in to comment.