Page 1 of 1

pickList is empty until first click on a pickList-Button

Posted: 25 Nov 2020, 13:19
by stephan7777
I have a p-pickList that only works after having clicked once at one of the pickList-Buttons. Before I do that, the pickList is completely empty.
I am using primeng 10.0.3 with angular/cli 10.1.7

My pickList html code looks like this:

<p-pickList [source]="pickableTodoItemTemplates" [target]="pickedTodoItemTemplates"
sourceHeader="Nicht ausgewählt" targetHeader="Ausgewählt" [showSourceControls]="false" [showTargetControls]="false"
(onMoveToTarget)="onMoveToTarget($event)" (onMoveToSource)="onMoveToSource($event)">
<ng-template let-tit pTemplate="item">
<div>
<div>
{{tit.displayName}}
</div>
</div>
</ng-template>
</p-pickList>

The source and target arrays are initialized in the success-callback method of a REST-Service call that is invoked from the ngOnInit() method of the component.

Any ideas what could be missing?

Re: pickList is empty until first click on a pickList-Button

Posted: 29 Nov 2020, 03:41
by tecgurus
I have same problem in one autocomplete multiple

Re: pickList is empty until first click on a pickList-Button

Posted: 07 Dec 2020, 23:26
by bredd33
I have a p-pickList that only works after having clicked once at one of the pickList-Buttons. Before I do that, the pickList is completely empty.
I am using primeng 10.0.3 with angular/cli 10.1.7

My pickList html code looks like this:

<p-pickList [source]="pickableTodoItemTemplates" [target]="pickedTodoItemTemplates"
sourceHeader="Nicht ausgewählt" targetHeader="Ausgewählt" [showSourceControls]="false" [showTargetControls]="false"
(onMoveToTarget)="onMoveToTarget($event)" (onMoveToSource)="onMoveToSource($event)">
<ng-template let-tit pTemplate="item">
<div>
<div>
{{tit.displayName}}
</div>
</div>
</ng-template>
</p-pickList>

The source and target arrays are initialized in the success-callback method of a REST-Service call that is invoked from the ngOnInit() method of the component.

Any ideas what could be missing?

have you tried this

Code: Select all

var allCorect =  {! NOTISBLANK(Case.Picklist1__c) && NOTISBLANK(Case.Picklist2__c) && NOTISBLANK(Case.Picklist3__c) && NOTISBLANK(Case.Picklist4__c) && NOTISBLANK(Case.Picklist5__c)};

if(allCorrect)
    top.location = '/'+VISUAL_FlOW_URL;
else
    alert('Picklist cant be empty ');

Re: pickList is empty until first click on a pickList-Button

Posted: 08 Dec 2020, 11:02
by ThoSap
I'm experiencing exactly the same issued with PrimeNG 10.0.3 and Angular 10.2.3