Add small delay before scrolling to url hash item.
Override ngPrime progress bar label styling, by enforcing the display of 0 value
This commit is contained in:
parent
f3ac0b6e82
commit
b00ef417af
|
@ -96,8 +96,8 @@ export class DynamicFormComponent implements OnInit {
|
||||||
this.progressbar = true;
|
this.progressbar = true;
|
||||||
|
|
||||||
this.route.fragment.subscribe((fragment: string) => {
|
this.route.fragment.subscribe((fragment: string) => {
|
||||||
//if (fragment)
|
var self = this;
|
||||||
this.scrollTo(fragment);
|
setTimeout(function () { self.scrollTo(fragment) });
|
||||||
});
|
});
|
||||||
|
|
||||||
this.route.queryParams.subscribe((params) => {
|
this.route.queryParams.subscribe((params) => {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
<p-progressBar [value]="value" [style]="{'height': '30px'}"></p-progressBar>
|
<p-progressBar [value]="value" [style]="{'height': '30px'}" [styleClass]="'alwaysVisible'"></p-progressBar>
|
|
@ -1,10 +1,13 @@
|
||||||
import { VisibilityRulesService } from '../../visibility-rules/visibility-rules.service';
|
import { VisibilityRulesService } from '../../visibility-rules/visibility-rules.service';
|
||||||
|
import { ViewEncapsulation } from '@angular/core';
|
||||||
|
|
||||||
import { Component, Input, OnInit } from '@angular/core';
|
import { Component, Input, OnInit } from '@angular/core';
|
||||||
import { FormGroup, FormControl, FormArray } from '@angular/forms'
|
import { FormGroup, FormControl, FormArray } from '@angular/forms'
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'progress-bar',
|
selector: 'progress-bar',
|
||||||
templateUrl: './progress-bar.component.html',
|
templateUrl: './progress-bar.component.html',
|
||||||
|
styles: ['.alwaysVisible .ui-progressbar-label { display:block!important; }'],
|
||||||
|
encapsulation: ViewEncapsulation.None
|
||||||
})
|
})
|
||||||
export class ProgressBarComponent implements OnInit {
|
export class ProgressBarComponent implements OnInit {
|
||||||
@Input() formGroup: FormGroup
|
@Input() formGroup: FormGroup
|
||||||
|
@ -12,7 +15,7 @@ export class ProgressBarComponent implements OnInit {
|
||||||
|
|
||||||
constructor(private visibilityRulesService: VisibilityRulesService) { }
|
constructor(private visibilityRulesService: VisibilityRulesService) { }
|
||||||
|
|
||||||
private value: number;
|
private value: number = 0;
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.formGroup
|
this.formGroup
|
||||||
.valueChanges
|
.valueChanges
|
||||||
|
|
Loading…
Reference in New Issue