title: Primeng picklist set source list dynamically
body: <p>I am using primeng picklist in my project with turbo-table and want a little help in setting the source list.I have a master list that contains different lists.What I want is for each row of the table set the fetch the corresponding list from the master list array based on the id of that row.I don't know how to achieve this.Right now I'm setting source to the first element of the masterARR but I want to set it to the element based on the row id of the table. Please help.Thanks in advance.</p>
  
  <p>Here is my template:</p>
  
  <pre><code>&lt;p-table [columns]="cols" #dt [value]="students"  [autoLayout]="enable" dataKey="id" &gt;
  
      &lt;ng-template pTemplate="header" let-columns&gt;
          &lt;tr&gt;
              &lt;th style="width: 3em"&gt;&lt;/th&gt;
              &lt;th&gt;Id&lt;/th&gt;
              &lt;th&gt;NAME&lt;/th&gt;
              &lt;th&gt;Roll No&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/ng-template&gt;
      &lt;ng-template pTemplate="body" let-rowData let-columns="columns"&gt;
          &lt;tr&gt;
              &lt;td&gt;{{rowData.id}}&lt;/td&gt;
  
              &lt;td&gt;{{rowData.name}}&lt;/td&gt;
              &lt;td&gt;{{rowData.rollno}}&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/ng-template&gt;
  
  &lt;/p-table&gt;
      &lt;p-dialog [(visible)]="display" [modal]="true" [responsive]="true" [style]="{width: '650px', minWidth: '200px'}" [minY]="70" [maximizable]="true" [baseZIndex]="10000"&gt;
          &lt;p-pickList (onMoveToTarget)="onChange($event)" [source]="masterArr[0]" [target]="targetCars" sourceHeader="Available" targetHeader="Selected" [responsive]="true" filterBy="name" dragdrop="true" sourceFilterPlaceholder="Search by name" targetFilterPlaceholder="Search by name"
              [sourceStyle]="{'height':'300px'}" [targetStyle]="{'height':'300px'}"&gt;
              &lt;ng-template let-hero let-rowdata pTemplate="item"&gt;
                  &lt;div&gt;
                      &lt;div class="ui-helper-clearfix"&gt;
                          &lt;div style="font-size:14px;float:right;margin:15px 5px 0 0"&gt; {{hero.value}}&lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/ng-template&gt;
  
          &lt;/p-pickList&gt;
  </code></pre>
  
  <p>Here is my ts code:</p>
  
  <pre><code>    this.arr1.push("A1");
      this.arr1.push("A2");
      this.arr2.push("D1");
      this.arr2.push("D2");
      this.masterArr.push(this.s);
      this.arr.push(this.d);
  </code></pre>