Questions tagged [react]

React is a JavaScript library for building user interfaces. It uses a declarative paradigm and aims to be both efficient and flexible.

Filter by
Sorted by
Tagged with
0
votes
2answers
35 views

Validate file extension type SPFX react

I have a upload attachment in react spfx , need to validate file based on the type, it should only allow pdf files other extensions should trigger an alert. I have added accept =".pdf" in ...
0
votes
0answers
5 views

strange behavior while editing classic page with React

I notice for the second time now that if you load a page and edit the react controls works just fine and the events are correctly working for changing any internal component state. The same does not ...
0
votes
1answer
28 views

Problem compiling React-Bootstrap in SPFx Project

I have installed react-bootstrap@2.0.0-beta.6 on my machine and included it in my project with 'import ~bootstrap/scss/bootstrap'. When I run gulp serve I get the following error: [13:46:14] Error - [...
0
votes
0answers
4 views

React native mobile app won't play Msft-hosted videos using Azure app authentication

We're having issues getting videos hosted in Sharepoint Online or Stream to render in our React Native mobile app. We're using Azure AD for authentication with AllSites.Write permissions and standard ...
0
votes
1answer
13 views

React components not working in Customizer

I am trying to use react components following this tutorial. But when I load the page I am getting a bunch of errors in chrome console complaining about invalid relative path in loading react and ...
0
votes
0answers
15 views

How to use items from api calls in another Api call

I have created configuration list which contains list name (configuration list). I wanted to use those list name to get all the columns from those list and export to excel (export from multiple list)? ...
0
votes
4answers
171 views

SPFX display rich text field in webpart

I am creating an SPFX React project that will display a field from a SharePoint list in a web part A user opens the property pane and: selects a list selects the item ID from that list selects the ...
0
votes
2answers
10 views

OpenPopUpPage not showing a popup

I have a SharePoint 19 web part written in React and I am trying to execute a function OpenPopUpPage which displays the content of some calendar events. If I type OpenPopUpPage('http://sp2019/sites/...
1
vote
1answer
133 views

React SPFX - populate Property Pane Drop down with ID's from SharePoint list

I am new to spfx and struggling with a simple task...!! I have a property pane drop down selecting a SharePoint list which works, now I would like a drop down that is dynamically populated with the ...
1
vote
1answer
38 views

Displaying a Qlik Sence Dashboard in SharePoint SPFx React Webpart

I want to create a SharePoint Online SPFx web part (using React) and want to embed QlickSence Dashboard in that web part. I am working with iframe, is there a better way of embedding using react?
0
votes
0answers
15 views

slick slider slides are not reducing when we add it in SP Page small section

I am using react slick slider, if i add it in a SP Modern page full section(3 slides) it works perfectly.but if i placed it in the One-third right sections. The same 3 slides appeared with conjusted ...
1
vote
1answer
32 views

how to render or display data in react useeffect hook

I am able to get data in react JSON object, now I want to convert the JSON to string data and display into the page, Please find the below screenshot. export const QvcPollsTab = () => { ...
0
votes
1answer
31 views

spfx React - include javascript assets in sppkg

I create my package with this command gulp clean gulp build --ship gulp package-solution --ship in my sppkg there aren't javascript files in package, and when I deploy this in the app catalog, and ...
0
votes
0answers
16 views

How to create a wiki app using react and SPFx steps?

I have to create app wiki in SharePoint using react. It should be displayed in SPFx web part in below format. Provide me any code examples in React JS. I would like to do a autocomplete search to find ...
0
votes
1answer
33 views

SharePoint SPFx webapp on staging site

I created a SharePoint SPFx react webpart that is now deployed on one of my SharePoint sites. I want to continue to make updates to this webpart. I "cloned" my SharePoint site so that it can ...
0
votes
1answer
256 views

Retrieve item ID after adding to SharePoint list using PNPJs

I'm building a SharePoint SPFx react app. In a nutshell, the user fills out a form that I created. When the user hits submit, using PNPJs: https://pnp.github.io/pnpjs/sp/items/ I'm adding the item to ...
0
votes
0answers
116 views

Height issue in React Slick Slider

I am using React slick slider in my spfx react webpart. how to fix this below issue, i want to have same height for all the slides. Added my css and render method below.Any help would be appreciated. ....
0
votes
0answers
41 views

How do I access SharePoint 2019 on-premises list data to Native React mobile app(Not SPFX WebPart)?

I want to access SharePoint 2019 on premises list data and do CRUD operation on it into react native mobile app. How do I do this using REST API(Without sending user name and password - Single sign on ...
0
votes
1answer
32 views

SPFx WebPart vs hosting plain HTML/Javascript page

I would like to know what are the advantages of creating a SPFx web-part instead of just hosting a custom html page with react on SharePoint 2019 on-premises. Thanks
0
votes
0answers
17 views

USA Map with Data

I am checking https://www.react-simple-maps.io/examples/usa-with-state-labels/ , was wondering how to implement when a user clicks on a state, some data which is defined should show up. How to get ...
1
vote
0answers
120 views

.JS file in SPFX WebPart: Module parse failed: Unexpected token You may need an additional loader to handle the result of these loaders

I have created an SPFx project with reactJS. I am using .jsx extension - functional components. Now, the spfx webpart is already working fine, but I saw a material kit that I want to reuse its ...
0
votes
0answers
46 views

SharePoint 2019 not getting all recurrence events in calendar

I am getting events with the help of a query and it is working ok. But I only get one item from the recurrence item even though I have <ExpandRecurrence> tag set to true. What am I doing wrong? ...
0
votes
0answers
500 views

Gulp bundle --ship: The build failed because a task wrote output to stderr error

I'm building a SharePoint SPFx and randomly when running gulp bundle --ship I get the following error: The build failed because a task wrote output to stderr. Exiting with exit code: 1 I saw this ...
0
votes
1answer
14 views

Why is temp array changing my state array? Sharepoint 2019 on premise, React, Typescript

I do not know why function setHours() that should work only on tempEvent is also changing my state this.state.events (it sets hours of my dates to 00:00:00. let tempEvent = this.state.events[i][&...
0
votes
0answers
29 views

Fetching Planner Task through Graph API into webpart

public componentDidMount() { this.props.context.msGraphClientFactory.getClient().then((client: MSGraphClient): void => { client .api('me/planner/tasks') .version("v1.0") ....
0
votes
2answers
78 views

Passing variables in Query string in tsx file (react +typescript)

I am trying to pass plainid and id as a parameter in query string in URL. {planid = item.planId} { id =item.id} <td><a href="https://tasks.office.com/credentinfotech.com/en-GB/...
0
votes
0answers
12 views

Add query string to url so that it can show the planner task pop up form

we have created webpart in sharepoint SPFX with react framework and fetch data using graph API From this webpart we want to redirect to planner task's popform This is the Planner Task PopUp form I ...
0
votes
1answer
307 views

SharePoint SPFx webpart not showing latest build

I'm building a SharePoint SPFx react webpart. I'm developing on a local level using workbench with a link similar to this: https://mysite.sharepoint.com/sites/sitehere/_layouts/15/workbench.aspx#/ ...
1
vote
0answers
77 views

Problem with Redux in SPFX [closed]

I am currently practising some Redux and now trying to implement it in a simple SPFx Counter webpart but I am facing problems. Here is the Webpart which is a simple counter: When I click the '...
1
vote
1answer
68 views

Problem with creating an instance of a class in SPFX(TypeScript/React)

I am facing a problem with creating an instance of a class in SPFX. I am not sure what I should put in as a parameter. The compiler complains on whatever I put as a parameter. Here is my code: import {...
0
votes
2answers
146 views

Custom SPO SPFx webpart causes page reload and/or redirect to http://acme.sharepoint.com/default.aspx

I'm developing a custom SPFx web part for our Sharepoint Online intranet. A couple of our test users have reported loading the page containing the web part, the page is either reloaded and/or they're ...
1
vote
1answer
268 views

React Web Part: PropertyPaneTextField as rich text field

I want to have a PropertyPaneTextField in my web part where I can enter format text like bold etc.. I couldn't find any properties for the PropertyPaneTextField where I can switch between richt text ...
0
votes
1answer
39 views

Programatically add "Web part gallery" in a custom web part in SharePoint Online

I have a custom web part that have different tabs. In two of the tabs/pivots I want the user to be able to add a web part from the web part gallery and to do so I need either to programatically add ...
0
votes
2answers
32 views

When a document is deleted or published in a document library

I have a requirement to develop a solution based on SPFx, namely, when a document is deleted from a document library or a document is published (got main version) in a document library in SharePoint ...
3
votes
1answer
162 views

SPFX Webpart width shrinked after published in Modern Page - SharePoint Online

Developing SPFX app, where everything looks good(I mean the width) in edit mode, soon after publish the webpart width is getting reduced somehow. Using Fabric UI CSS .propertyDigitalManagementWebpart ...
1
vote
1answer
157 views

Minimize and open iframe using react js in SPFX

I have a iframe control imported from 'react-iframe'.We are showing a chatbot(PowerVirtualAgent) inside an iframe . I want to have a minimize button and open button functionalities over the iframe ...
0
votes
1answer
239 views

Error when adding DateTimePicker from PnP SPFx React controls

I'm having problem when adding DateTimePicker from the @pnp/spfx-controls-react collection. Once added in the render() method, I'm seeing <DateTimePicker name underlined and following error: '...
0
votes
0answers
32 views

Runtime error in SPFx React app when using react-datepicker

I'm having problem when including react-datepicker to my solution. It's very simple SPFx React project. I'd be glad to get any help with this. I'm pretty new to SPFx and React. The error shows as soon ...
0
votes
1answer
29 views

How to fetch value from PeoplePicker sp-dev-fx-controls-react and use it in Rest Call url for filtering?

I am using PeoplePicker from pnp/spfx for picking people names in order to avoid some spelling mistake. So in order to filter the results in REST Call ajax. The value from PeoplePicker needs to be ...
0
votes
0answers
12 views

Component Inheritance from Property Pane

I want to know if it is possible for other react components created within the spfx project to inherit property pane properties from the root class and if yes how does one go about it???
0
votes
2answers
63 views

Trying to fetch items of Person or Group type column from another list in React Sharepoint?

I want to fetch items of Person or Group type column from another list in React SharePoint but there is a restriction I cannot use it in a single query. So far I have only known using REST. So if ...
0
votes
1answer
47 views

Item not fetching using lookup in React Sharepoint

I am trying to fetch items using lookup but seems like it I cannot expand the child people picker column like there is a restriction in which I can't use person field by expanding the child list. Here'...
0
votes
1answer
56 views

Default font color of richtext control

Is it possible to set the default color of a Richtext React control element? I'm trying to make my webpart responsive to the section background color. It's possible to give the richtext element its ...
0
votes
2answers
47 views

Retrieve data from 2 tables in react sharepoint [duplicate]

I have 2 different data in 2 different table [One is APP_NAME1 and other is in APP_NAME2]. In one table I have Name and ID and in other one I have kit, ID, Temperature. Is there any way to fetch and ...
0
votes
1answer
513 views

Filtering listview using React Sharepoint

I am trying to display data in react-data-table-component according to the input given in the search field using Rest API. For eg: If a user enters name of the person the react-data-table-component ...
0
votes
2answers
744 views

Using REST API to get list items from Sharepoint [site content] in React and displaying it in table format

I am trying below code to fetch list items from SharePoint and displaying in table format using REST API up to some point I have wrote the below code. I am unable to figure out how the items will be ...
0
votes
1answer
920 views

Get and show image in SPFx webpart from a Image column in a SP List

I am currently building a SPFx webpart with React that will get items from a SharePoint list via PnP Js but when I'm trying get the image from the list I get stuck. Right now my SPFx webpart looks ...
0
votes
1answer
606 views

Trying to fetch data from Site Content in React Sharepoint in tsx file

I am new to React Sharepoint and I have list of items and data stored in Site Content in sharepoint. But I don't know how to fetch and display data items in React Sharepoint with the help of click ...
1
vote
0answers
46 views

How to set active item index in pnp/spfx carousel?

I am using Pnp/spfx Carousel control and binding elements like below: <Carousel buttonsLocation={CarouselButtonsLocation.center} buttonsDisplay={...
2
votes
0answers
44 views

Get Detailed SP List Item Version History

I am using ReactJS to develop a custom form and my list includes a multiple lines of text field with the AppendOnly flag set to true. When I open the form, I want to retrieve the version history for ...

1
2 3 4 5