- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
// где-то в классе MyTable
public next() {
if (this.firstVisibleRow + this.currentRow < this.sortedData.length) {
this.firstVisibleRow = this.firstVisibleRow + this.currentRow;
}
this.sortTable();
}
public prev() {
if (this.firstVisibleRow - this.currentRow > 0) {
this.firstVisibleRow = this.firstVisibleRow - this.currentRow;
} else {
this.firstVisibleRow = 0;
}
this.sortTable();
}
public sortTable() {
this.sortedData.forEach((item, index) => {
for (let i = this.firstVisibleRow; i < (this.firstVisibleRow + this.currentRow); i++) {
if (i === index) {
this.visiblilityList[index] = true;
return;
}
}
this.visiblilityList[index] = false;
});
}
OlegUP 09.08.2019 16:43 # −2
OCETuHCKuu_nemyx 09.08.2019 16:51 # 0
Я пишу
и теку
bootcamp_dropout 10.08.2019 14:34 # 0
AHCKuJlbHblu_nemyx 11.08.2019 14:31 # 0
bootcamp_dropout 11.08.2019 15:45 # 0
HEMECTHblu_nemyx 12.08.2019 00:43 # +1