In multiple selection, the row is selected by a click event on a specific row and multiple rows can be selected using the Meta key or Shift key. This selection is enabled by setting selectionMode as multiple and the selection property to hold selected rows in the form of an array. By default, the row is unselected with the help of the Meta key (Ctrl key for Windows or Command key for macOS). The row can be unselected without the help of Meta key just by disabling the metaKeySelection property.
The component with the multiple selection feature to select multiple browser records would be written as follows:
<p-dataTable [value]="basicBrowsers" selectionMode="multiple"
[(selection)]="selectedBrowsers">
// Content goes here
</p-dataTable>
The component class has to define the selectedBrowers array object to store the selected records. The following screenshot shows a snapshot result with multiple selection as an example:
To notify...