You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2020/04/02 15:27:11 UTC
[myfaces-tobago] 02/02: Update tobago-sheet.ts
This is an automated email from the ASF dual-hosted git repository.
lofwyr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git
commit cf42e951d3d61c958f7cdcc58754e0de120cc2ce
Author: Udo Schnurpfeil <gi...@schnurpfeil.de>
AuthorDate: Thu Apr 2 17:25:39 2020 +0200
Update tobago-sheet.ts
---
.../tobago-theme-standard/src/main/npm/ts/tobago-sheet.ts | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-sheet.ts b/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-sheet.ts
index 5b6604c..f355373 100644
--- a/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-sheet.ts
+++ b/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-sheet.ts
@@ -744,7 +744,7 @@ class Sheet extends HTMLElement {
this.dataset.tobagoLastClickedRowIndex = String(row.sectionRowIndex);
if (checkbox && !checkbox.disabled) {
const selected = this.getHiddenSelected();
- const rowIndex = this.getDataIndex(row);
+ const rowIndex = Number(row.getAttribute("row-index"));
if (this.isSelected(rowIndex)) {
this.deselectRow(selected, rowIndex, row, checkbox);
} else {
@@ -777,7 +777,7 @@ class Sheet extends HTMLElement {
const row = rows.item(i);
const checkbox = this.getSelectorCheckbox(row);
if (checkbox && !checkbox.disabled) {
- const rowIndex = this.getDataIndex(row);
+ const rowIndex = Number(row.getAttribute("row-index"));
const on = value.has(rowIndex);
if (selectDeselected && !on) {
this.selectRow(selected, rowIndex, row, checkbox);
@@ -788,10 +788,6 @@ class Sheet extends HTMLElement {
}
}
- getDataIndex(row: HTMLTableRowElement): number {
- return parseInt(row.dataset.tobagoRowIndex);
- }
-
/**
* @param selected input-element type=hidden: Hidden field with the selection state information
* @param rowIndex int: zero based index of the row.