sp-dev-fx-controls-react icon indicating copy to clipboard operation
sp-dev-fx-controls-react copied to clipboard

FilePicker JSX element class does not support attributes because it does not have a 'props' property

Open andreasbalzer opened this issue 1 year ago • 1 comments

Category

[ ] Enhancement

[x] Bug

[ ] Question

Version

Please specify what version of the library you are using: [3.18.1]

Expected / Desired Behavior / Question

It should be possible to use FilePicker in a React app via <FilePicker .... />.

Observed Behavior

JSX element class does not support attributes because it does not have a 'props' property.ts(2607) 'FilePicker' cannot be used as a JSX component. Its type 'typeof FilePicker' is not a valid JSX element type. Types of construct signatures are incompatible. Type 'new (props: IFilePickerProps) => FilePicker' is not assignable to type 'new (props: any, deprecatedLegacyContext?: any) => Component<any, any, any>'. Type 'FilePicker' is missing the following properties from type 'Component<any, any, any>': context, setState, forceUpdate, props, and 2 more.ts(2786)

andreasbalzer avatar Jul 27 '24 11:07 andreasbalzer

Thank you for submitting your first issue to this project.

github-actions[bot] avatar Jul 27 '24 11:07 github-actions[bot]

Hi @andreasbalzer,

When you mention "React app", are you still talking about a SPFx solution?

If so, would you mind giving a code snippet in order to better understand what you're trying to do?

michaelmaillot avatar Jan 29 '25 18:01 michaelmaillot

Closing this, feel free to reopen it if needed.

michaelmaillot avatar Mar 24 '25 22:03 michaelmaillot