Creating custom property pane controls
Previously in our solution, we hardcoded the product list name setting value in the web part manifest. Although it seems to be a convenient option, what if the list doesn’t have this specific name on the site? In such a scenario, our web part will simply not work.
To give more flexibility to our solution, we created a custom property pane control to let users configure dynamically the products list to use. This control will fetch the available lists on the current site and let users choose one from a combo box.
Understanding the typical structure of a custom property pane field
Every property pane field class inherits from the IPropertyPaneField interface defining the common methods and properties a property pane field should implement. This interface takes as a parameter another interface representing the properties your field will expose to consumers (i.e., the web part root class through the getPropertyPaneConfiguration() method...