I would like to know if there is a way to print the selected value of a Dropdown menu that is inside the Property Pane in SPFX.
Like, in my case, how to make it print with a console.log "Ascending" or "Descending" when selected from the Dropdown, or at least the respective key ('ASC' or 'DES')
Here is my code:
PropertyPaneDropdown('ItemsDropDown',{
label: "Sort by",
options: [
{ key: 'ASC', text: 'Ascending' },
{ key: 'DES', text: 'Descending' }
],
selectedKey: strings.SelectedKeyDropdown,
})
Here is a screenshoot of my Dropdown