title: PrimeNg - Data Table Selection Values with Nested Components
body: <p>I have a <code>p-dataTable</code> with nested <code>p-dropdown</code> components.  On selection of a row, how can I get the selected values of the row?  In the selection callback I receive the array backing each dropdown, and not the selection itself.</p>
  
  <p><a href="https://i.stack.imgur.com/edkdh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/edkdh.png" alt="enter image description here"></a></p>
  
  <pre><code>&lt;p-dataTable [value]="affiliates" sortField="name" dataKey="id"  selectionMode="single" (onRowSelect)="onRowSelect($event)" [rows]="15" [paginator]="true" [pageLinks]="10"&gt;
      &lt;p-column field="name" header="Name" sortable="true" [filter]="true" filterPlaceholder="Search" filterMatchMode="contains"&gt;&lt;/p-column&gt;    
      &lt;p-column field="package" header="Packages"&gt;
          &lt;ng-template let-affiliate="rowData" pTemplate type="body"&gt;
              &lt;p-dropdown [options]="affiliate.packages" dataKey="label"&gt;&lt;/p-dropdown&gt;
          &lt;/ng-template&gt;
      &lt;/p-column&gt;
      &lt;p-column field="country" header="Countries"&gt;
          &lt;ng-template let-affiliate="rowData" pTemplate type="body"&gt;
              &lt;p-dropdown [options]="affiliate.countries" dataKey="label"&gt;&lt;/p-dropdown&gt;
          &lt;/ng-template&gt;
      &lt;/p-column&gt;
      &lt;p-column field="device" header="Devices"&gt;
          &lt;ng-template let-affiliate="rowData" pTemplate type="body"&gt;
              &lt;p-dropdown [options]="affiliate.devices" dataKey="label"&gt;&lt;/p-dropdown&gt;
          &lt;/ng-template&gt;
      &lt;/p-column&gt;
      &lt;p-column header="Actions"&gt;
  
      &lt;/p-column&gt;
  &lt;/p-dataTable&gt;
  </code></pre>