Fixed #130 - Keydown causes sort on sortable header

pull/132/head
cagataycivici 2019-12-30 21:23:43 +03:00
parent 90759903dc
commit e2c18b460c
3 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
<template>
<div class="content-section layout-footer clearfix">
<span>PrimeVue 1.0.0-rc.5</span>
<span>PrimeVue 1.0.0-rc.6</span>
<div class="footer-links">
<a href="https://github.com/primefaces/primevue"><i class=" icon-github fa fa-github-square"></i></a>
<a href="https://twitter.com/primevue"><i class="icon-twitter fa fa-twitter-square"></i></a>

View File

@ -156,7 +156,7 @@ export default {
this.$emit('checkbox-change', event);
},
onColumnKeyDown(event, col) {
if (event.currentTarget.nodeName === 'TH' && DomHandler.hasClass(event.currentTarget, 'p-sortable-column')) {
if (event.which === 13 && event.currentTarget.nodeName === 'TH' && DomHandler.hasClass(event.currentTarget, 'p-sortable-column')) {
this.$emit('column-click', {originalEvent: event, column: col});
}
},

View File

@ -716,7 +716,7 @@ export default {
}
},
onColumnKeyDown(event, col) {
if (event.currentTarget.nodeName === 'TH' && DomHandler.hasClass(event.currentTarget, 'p-sortable-column')) {
if (event.which === 13 && event.currentTarget.nodeName === 'TH' && DomHandler.hasClass(event.currentTarget, 'p-sortable-column')) {
this.onColumnHeaderClick(event, col);
}
},