aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/_elements/form-dataset/form-dataset.component.ts
diff options
context:
space:
mode:
authorTAMARA JERINIC <tamara.jerinic@gmail.com>2022-05-17 22:52:03 +0200
committerTAMARA JERINIC <tamara.jerinic@gmail.com>2022-05-17 22:52:03 +0200
commite0d0e1faf5b076818606df73de1e4fed259d58da (patch)
treefe1a99386d737bf71dfee145308e6e1e8e17563b /frontend/src/app/_elements/form-dataset/form-dataset.component.ts
parent89889173dd3992cea3b4251abed120d6caf07305 (diff)
parent8b539c658eda714a9886e169f7cd37953efff762 (diff)
Merge branch 'redesign' of http://gitlab.pmf.kg.ac.rs/igrannonica/neuronstellar into redesign
Diffstat (limited to 'frontend/src/app/_elements/form-dataset/form-dataset.component.ts')
-rw-r--r--frontend/src/app/_elements/form-dataset/form-dataset.component.ts14
1 files changed, 11 insertions, 3 deletions
diff --git a/frontend/src/app/_elements/form-dataset/form-dataset.component.ts b/frontend/src/app/_elements/form-dataset/form-dataset.component.ts
index d801b5fb..19c0083c 100644
--- a/frontend/src/app/_elements/form-dataset/form-dataset.component.ts
+++ b/frontend/src/app/_elements/form-dataset/form-dataset.component.ts
@@ -47,20 +47,28 @@ export class FormDatasetComponent {
this.begin=0;
}
goBack(){
- if(this.begin-10<=0)
+ if(this.begin-10<0)
this.begin=0;
else
+ {
this.begin-=10;
- this.loadExisting();
+ this.loadExisting();
+ }
}
goForward(){
this.begin+=10;
- this.loadExisting();
+ if(this.dataset.rowCount<this.begin)
+ this.begin-=10;
+ else
+ this.loadExisting();
}
clear(){
this.tableData.hasInput = false;
}
+ getPage(){
+ return Math.ceil(this.dataset.rowCount/10)
+ }
changeListener($event: any): void {
this.files = $event.srcElement.files;