Forum Discussion
PeterKiers
Apr 13, 2025Copper Contributor
How to pass a value from the PropertyPane to the webpart in SPFx?
I have made a SharePoint webpart with the PnP ListPicker on the PropertyPane of the webpart and the PnP DateTimePicker on the webpart itself. How can I pass the value "Lists:string|string[]" on the ...
michalkornet
Apr 24, 2025Steel Contributor
Hi PeterKiers , you need to locate the file where the web part properties are defined. This should be in the YOUR_NAMEWebPart.ts file.
In the interface, you’ll find a default property like description: string.
export interface IYOUR_NAMEWebPartProps {
description: string,
lists: string | string[]; // Stores the list ID(s)
}Then you can access the value by using this.properties.lists