Skip to content

Commit

Permalink
Fixed #397 - Rename p-datatable-row to p-selectable-row
Browse files Browse the repository at this point in the history
  • Loading branch information
cagataycivici committed Jul 18, 2020
1 parent 6fb69df commit 9a9dd68
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/components/datatable/DataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ export default {
findNextSelectableRow(row) {
let nextRow = row.nextElementSibling;
if (nextRow) {
if (DomHandler.hasClass(nextRow, 'p-datatable-row'))
if (DomHandler.hasClass(nextRow, 'p-selectable-row'))
return nextRow;
else
return this.findNextSelectableRow(nextRow);
Expand All @@ -780,7 +780,7 @@ export default {
findPrevSelectableRow(row) {
let prevRow = row.previousElementSibling;
if (prevRow) {
if (DomHandler.hasClass(prevRow, 'p-datatable-row'))
if (DomHandler.hasClass(prevRow, 'p-selectable-row'))
return prevRow;
else
return this.findPrevSelectableRow(prevRow);
Expand Down Expand Up @@ -1862,7 +1862,7 @@ export default {
table-layout: auto;
}
.p-datatable-hoverable-rows .p-datatable-row {
.p-datatable-hoverable-rows .p-selectable-row {
cursor: pointer;
}
Expand Down
6 changes: 5 additions & 1 deletion src/components/datatable/TableBody.vue
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,11 @@ export default {
return this.dataKey ? ObjectUtils.resolveFieldData(rowData, this.dataKey): index;
},
getRowClass(rowData) {
let rowStyleClass = ['p-datatable-row'];
let rowStyleClass = [];
if (this.selectionMode) {
rowStyleClass.push('p-selectable-row');
}
if (this.selection) {
rowStyleClass.push({
'p-highlight': this.isSelected(rowData)
Expand Down

0 comments on commit 9a9dd68

Please sign in to comment.