Fix checkbox breaking UI
This commit is contained in:
@@ -42,6 +42,13 @@ export class JobNewComponent {
|
|||||||
};
|
};
|
||||||
|
|
||||||
ngAfterViewInit(){
|
ngAfterViewInit(){
|
||||||
|
this.formSteps.changes.subscribe(() => {
|
||||||
|
this.updateUI();
|
||||||
|
});
|
||||||
|
this.updateUI();
|
||||||
|
}
|
||||||
|
|
||||||
|
updateUI(){
|
||||||
this.formSteps.forEach((step: ElementRef<HTMLDivElement>, i: number) => {
|
this.formSteps.forEach((step: ElementRef<HTMLDivElement>, i: number) => {
|
||||||
if (i === this.currentStep) {
|
if (i === this.currentStep) {
|
||||||
step.nativeElement.style.left = '0%';
|
step.nativeElement.style.left = '0%';
|
||||||
@@ -55,28 +62,12 @@ export class JobNewComponent {
|
|||||||
|
|
||||||
nextStep(){
|
nextStep(){
|
||||||
this.currentStep += 1;
|
this.currentStep += 1;
|
||||||
this.formSteps.forEach((step: ElementRef<HTMLDivElement>, i: number) => {
|
this.updateUI();
|
||||||
if (i === this.currentStep) {
|
|
||||||
step.nativeElement.style.left = '0%';
|
|
||||||
} else if (i < this.currentStep) {
|
|
||||||
step.nativeElement.style.left = '-100%';
|
|
||||||
} else {
|
|
||||||
step.nativeElement.style.left = '100%';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
prevStep(){
|
prevStep(){
|
||||||
this.currentStep -= 1;
|
this.currentStep -= 1;
|
||||||
this.formSteps.forEach((step: ElementRef<HTMLDivElement>, i: number) => {
|
this.updateUI();
|
||||||
if (i === this.currentStep) {
|
|
||||||
step.nativeElement.style.left = '0%';
|
|
||||||
} else if (i < this.currentStep) {
|
|
||||||
step.nativeElement.style.left = '-100%';
|
|
||||||
} else {
|
|
||||||
step.nativeElement.style.left = '100%';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PostJobListing(jobListing: JobListing){
|
PostJobListing(jobListing: JobListing){
|
||||||
|
|||||||
Reference in New Issue
Block a user