p-inputMask with angular 8 doesn't set value

UI Components for Angular
Post Reply
ua_developer
Posts: 4
Joined: 26 Apr 2017, 14:05

18 Jul 2019, 15:37

in ngOnInit

Code: Select all

this.formGroup.setValue(value); 
doesn't set p-inputMask value with angular 8 and following p-inputMask code;

Code: Select all

 @ViewChild('input', { static: false }) inputViewChild: ElementRef; 
changing to

Code: Select all

 @ViewChild('input', { static: true }) inputViewChild: ElementRef; 
fix the problem,

also

Code: Select all

 setTimeout(() => {
   this.formGroup.setValue(value);
}, 0);
works.

yigitfindikli
Posts: 335
Joined: 08 Aug 2018, 14:09

22 Jul 2019, 11:12

ua_developer wrote:
18 Jul 2019, 15:37
in ngOnInit

Code: Select all

this.formGroup.setValue(value); 
doesn't set p-inputMask value with angular 8 and following p-inputMask code;

Code: Select all

 @ViewChild('input', { static: false }) inputViewChild: ElementRef; 
changing to

Code: Select all

 @ViewChild('input', { static: true }) inputViewChild: ElementRef; 
fix the problem,

also

Code: Select all

 setTimeout(() => {
   this.formGroup.setValue(value);
}, 0);
works.
Hi,
Can you create ticket at https://github.com/primefaces/primeng/issues ?
Best Regards.

ua_developer
Posts: 4
Joined: 26 Apr 2017, 14:05

23 Jul 2019, 08:38

yigitfindikli wrote:
22 Jul 2019, 11:12

ticket created https://github.com/primefaces/primeng/issues/7979
ua_developer wrote:
18 Jul 2019, 15:37
in ngOnInit

Code: Select all

this.formGroup.setValue(value); 
doesn't set p-inputMask value with angular 8 and following p-inputMask code;

Code: Select all

 @ViewChild('input', { static: false }) inputViewChild: ElementRef; 
changing to

Code: Select all

 @ViewChild('input', { static: true }) inputViewChild: ElementRef; 
fix the problem,

also

Code: Select all

 setTimeout(() => {
   this.formGroup.setValue(value);
}, 0);
works.
Hi,
Can you create ticket at https://github.com/primefaces/primeng/issues ?
Best Regards.

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: Bing [Bot] and 2 guests