1

I am using PNP SPFx React PeoplePicker in my SPFx webpart. But when I add allowUnvalidated property to my PeoplePicker. I get this error:

Property 'allowUnvalidated' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly & Readonly<...>'.ts(2322)

I also change the SPFx version from 1.11 to 1.14 but still get the same error.

Below is the code that I have used:

import {
  PeoplePicker,
  PrincipalType,
  IPeoplePickerUserItem,
} from "@pnp/spfx-controls-react/lib/PeoplePicker";

     <PeoplePicker
            context={porps.context as any}
            personSelectionLimit={3}
            groupName={""}
            onChange={_addUser}
            principalTypes={[PrincipalType.User, PrincipalType.SecurityGroup]}
            resolveDelay={200}
            defaultSelectedUsers={_Picker}
            allowUnvalidated={true}
          />

1 Answer 1

0

As per the release history of PnP SPFx Controls library,

allowUnvalidated property in PeoplePicker control is added in v3.9.0 release.

So, try using latest version of PnP SPFx Controls library.

For example:

You can install specific version of library using command like below:

npm install @pnp/[email protected] --save --save-exact
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.