react js
5 TopicsWhat format should the defaultSelectedUsers be for the pnp PeoplePicker?
I'm struggling to populate the people picker here: <PeoplePicker context={this.props.context} personSelectionLimit={3} groupName={''} // Leave this blank in case you want to filter from all users showtooltip={false} isRequired={false} disabled={false} selectedItems={this._getPanellistsPickerItems}//This is the 'onChange' showHiddenInUI={false} defaultSelectedUsers={panellists ? panellists : []} principalTypes={[PrincipalType.User]} resolveDelay={1000} ensureUser={true} /> I'm trying to populate it with the items retrieved from an SP list. As you can see it is a multi-person PP which accepts 3. I have a component scope variable that I believe is populated correctly with all users, this logs as: (3) ["user03@domain.com", "user02@domain.com", "user01@domain.com"] 0: "user02@domain.com" 1: "user01@domain.com" 2: "user02@domain.com" length: 3 __proto__: Array(0) But if I add the panellists[] to the defaultSelectedUsers, it doesn't display anything on retrieval. I the formatting wrong? Regards, T1.3KViews0likes1Commentfetch document content from Teams file
I am working on the ReactJS app where I need to fetch data from the document which is uploaded on the Microsoft Teams. So my question is. - Is this possible to fetch document content from Teams by javascript? I tried the "Pernille-Eskebo/teams-js" package and did some RnD but didn't get any fruitful solution. Note: Our App is totally client-side.1.7KViews0likes1CommentSPFX React JS POST REST Call not working - Cannot read property 'post' of undefined
I am trying to authenticate username and password only to a public Authorization. It is always throwing error - "Cannot read property 'post' of undefined". I have used this.context.httpClient.POST( postURL, HttpClient.configurations.v1, httpClientOptions) Below is the request body and headers const body: string = JSON.stringify({ 'username': value1, 'password': value2, 'options': value3, }); const requestHeaders: Headers = new Headers(); requestHeaders.append('Content-type', 'application/json'); requestHeaders.append('Accept', 'application/json'); requestHeaders.append('Cache-Control', 'no-cache'); requestHeaders.append('User-Agent', 'PostmanRuntime/7.20.1'); requestHeaders.append('Postman-Token', 'xxxxxxxxxxxxxxxxxxxxxxxxxx'); requestHeaders.append('Host', 'xxxxxx.oktapreview.com'); requestHeaders.append('Accept-Encoding', 'gzip, deflate'); requestHeaders.append('Content-Length', '161'); requestHeaders.append('Cookie', 'xxxxxx=xxxxxxxxxxxxxxxxxxxxx'); requestHeaders.append('Connection', 'keep-alive');3.2KViews0likes0Comments