To clear the selected dropdown value, just set the selected option to an empty string. For example, here's a drop-down that let's the user select "Last Month" or "Last Week:"
Component
ngOnInit() {
// Initialize drop-down values
this.ranges = [];
this.ranges.push({label: 'Last Month', value: 'Last Month'});
this.ranges.push({label: 'Last Week', value: 'Last Week'});
}
clearDropDown = () => {
this.selectedRange = '';
};
Template:
<p-dropdown
[options]="ranges"
[(ngModel)]="selectedRange"
placeholder="Select a Date Range">
</p-dropdown>
<button (click)="clearDropDown()">Clear Date Range</button>
If 'Last Month' is currently selected in the dropdown, clicking the button will clear the dropdown value (and 'Select a Date Range' will once again be shown).
PS: In this example, 'Select a Date Range' is placeholder text. It is not a selectable option from the dropdown. In most cases, this is what you want.