Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [spfx-webparts]

Technical questions about building and using web parts based on the SharePoint Framework client-side development model.

2
votes
1answer
369 views

Modify/Access webpart properties in SharePoint Framework (Spfx)

I am trying to saving some value in the Web part properties. I know in Spfx you can save or update any value in webpart property like this.properties.myProp = "newValue"; I am using angular ...
0
votes
2answers
328 views

Displaying package version number (n.n.n.n) in the body of a web part

Looking for a way to grab the package version number (that is, the value of solution.version that is stored in package-solution.json and which is displayed in the app catalog) and render it in a ...
2
votes
2answers
217 views

How to catch navigation event in SPFx webpart?

Is it possible to catch navigation event inside Sharepoint Framework web part? I know this is possible in application customizer using context.placeholderProvider.changedEvent, but I cannot find ...
0
votes
1answer
23 views

Adding :visited tags SPFX

I'm trying to create a simple web part to become more familiar with SPFX, and I have the following block for displaying my list of icons. From render: <div class="${ styles.sizing }"> <a ...
0
votes
3answers
853 views

Custom Form for Modern UI List item/Content Type

Is there a way to customize the layout of the list items/content types in Modern UI ? Right now whenever we click to the title it will open the right panel which I couldn't find a way to customize it. ...
1
vote
1answer
258 views

How to make SPFx web part content searchable

I'm working on a Communications site, and I can't make content created in special custom editors (like the React Script Editor, or the React TinyMCE editor included in the sample web parts) searchable....
1
vote
1answer
175 views

Problems Unit Testing in SharePoint Framework (SPFx) with External Dependencies

I'm attempting to use Elio and Velin's guidance on creating unit tests for the SharePoint framework. Both appear to work great for vanilla components, but I'm running into problems when trying to ...
5
votes
2answers
317 views

Is Callouts available in SharePoint Framework

I have a classic SharePoint Add-in and I am trying to convert it into SharePoint framework Webpart. I am getting the following error Cannot read property 'getFromLaunchPointIfExists' of undefined ...
0
votes
1answer
261 views

I have deployed my clientside webpart solution, but I can’t add it to my site

I created a sharepoint framework webpart and uploaded it to the app catalog. I enabled it for users to be able to add to sites. However, it’s not showing up in gallery when I choose to add an app. Is ...
1
vote
0answers
27 views

How to get custom webpart have its table rendering overlay other SP Online page elements below it? [closed]

I'm authoring custom web parts with SPFx. I've tried fiddling with the CSS z-index and even with setting the lower page part , that is, the part-to-be-overlaid to negative value with the part ...
1
vote
1answer
227 views

SPFx WebPart Redux in Combination with ServiceScope - WebPartContext-Error

My WebPart makes use of Redux. My dataAction calls a Service (ServiceScope) to fetch data. Because my Service uses HTTPClient I send the WebPartContext as Parameter from WebPart to Action. The ...
2
votes
2answers
713 views

PageContextInfo: Page Context is undefined in sharepoint framework (Webpart)

I am trying to upgrade an old sharepoint project to the latest sharepoint framework. The client part is built with angular. As in spfx _spPageContextInfo is not available so I tired changing the code ...
2
votes
0answers
52 views

Is it possible to create a SharePoint hosted list by SPFx?

I need to create a list inside the app which I can remove it when I delete the app from the site.
0
votes
0answers
29 views

SharePoint Framework WebParts add bootstrap [duplicate]

How Can I use bootstrap in a SharePoint Framework WebPart? Thanks.
1
vote
1answer
315 views

How will SPFx on SharePoint-Online detect the language

Regional Settings in related SharePoint-Site? -- What about alternate activated languages? -- What about preferred language setting in user profile? So, who will win when opening a page with a ...
1
vote
2answers
1k views

SharePoint Framework: how to display document library data in a SPFx client side web part using ReactJs and Type Script

I need to fetch data from document library which resides in SharePoint online and display in spfx client web part with filtering, paging and sorting features. Tools: ReactJs, TypeScript, Visual ...
0
votes
1answer
180 views

Why doesn't DOM element behave when setting visibility or display with SPFx/Typescript?

code snippets here produce/render expected data and alert box shows [object HTMLDivElement] the div will not hide; same is true using "visibility", "hidden" <p> <input id="...
0
votes
0answers
220 views

SPFX Web Part not loading on IE

I have a project with 5 web parts. 4 of the load in IE just fine, but 1 doesn't. I get no console error, the javascript file is loaded in the network window, but nothing happens. 5/5 Web Parts work ...
0
votes
0answers
22 views

Custom buttons in list view

Is it possible to add a button/anchor link into a SharePoint list along with some basic JavaScript functionality? Example: Button for each item in the list Value for each button is a hard-coded URL +...
0
votes
0answers
195 views

Unable to put “label” from Managed metadata field in SPFX using rest

So i'm facing this problem that I don't know how too solve..I want to get the managed metadata value from my document library using rest API. All other fields are being retrieved without a hitch but ...
0
votes
3answers
976 views

getting current logged in user in SP list

I have made one webpart using spfx, on submit button its values are pushing in SP list but in SP list I want user who is currently logged in, its value should come in one of the field of Sp list, how ...
0
votes
0answers
40 views

Interaction with Lists in SPFx

Are there any tutorials which are better than the Microsoft Tutorial for explaining integrating with lists? I've found the one provided by MS to be outdated and skips actually doing anything with ...
0
votes
1answer
899 views

WebParts keep loading untill I scroll down the page or perform a zoom

environment:SharePoint online;Sharepoint Framework; Programming languages:TypeScript During page loading, sharepoint custom web part keeps on loading Nothing does change untill I scroll down the ...
0
votes
2answers
480 views

Host Client-Side web part from SharePoint Library

I'm following the SPFx Getting started guide for web parts and I'm at part 4. In the note at the top of the page, there is mention of hosting from a SharePoint Library from your tenant (immediately ...
1
vote
1answer
137 views

Custom section layout using SPFX

Is it possible to add a custom section layout using SPFX? I'd like to build a custom layout with my own logic and rules. In the documentation, only Webparts are explained. My question is similar to ...
5
votes
1answer
663 views

Include JavaScript file so it load automatically in SharePoint Framework

I am beginner and trying to include JS file in my SharePoint Framework Webpart. I learned how to call different functions of the JS file. I know you can include the file using const myScript = ...
0
votes
1answer
155 views

SPFx Web Part: Loading Dependent Scripts

I'm using the instructions here to load a library dependent on jQuery that is being served from my dev site. My config.json looks like: { "$schema": "https://dev.office.com/json-schemas/spfx-build/...
2
votes
1answer
54 views

Best Practice for Stylesheet If statements in SPFx

I'm starting to work with SPFx and have the following code: public render(): void { SPComponentLoader.loadCss('https://use.fontawesome.com/releases/v5.0.6/css/all.css'); var abc = (this.properties....
0
votes
1answer
949 views

Sharepoint Online Modern script editor webpart(spfx) is not available in some sites

I have build and deployed the react-script-editor web part to app catalog as explained on site(https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-script-editor). It is ...
0
votes
1answer
66 views

SPFx -Error when use last version of Office-UI-React with SPFX 1.4.0

I want to use last version of Office-UI-React with SharePoint Framework v 1.4.0 with TypeScript Version 2.2.2. When i install last version office-UI-React have following error:
1
vote
2answers
217 views

Best practice recommendation for where to locate SPFx ReactJS component code?

In looking at various SPFx tutorials/samples, I've noticed different paradigms demonstrated for where to locate the ReactJS component code. For example, Patrick Rodgers' tutorial on transitioning to @...
3
votes
1answer
1k views

How do I disable trailing-comma tslint rule in SPFx scaffolding?

I ran the current Yeoman SharePoint generator, and got the following ts-lint file in the config directory (with a few minor tweaks added). From what I can tell the trailing-comma rule should be ...
3
votes
3answers
282 views

SPFX- Array.prototype.diff - (TS) property “diff” does not exist on type 'any[]'- es6 issue?

I have some code that takes a SP List item column (a news article tagged to one or more choice categories) and want to show that to users who have a user profile property with one or more categories ...
0
votes
1answer
321 views

Hiding out of the box actions from ribbon using Spfx extensions

My requirement: I want the user to enter the list but I don't want him to use the out of the box actions within the lists like creating flows, quick edit, etc. I would like a user to edit the items ...
0
votes
1answer
209 views

Get value from Person or Group Type field in SPFx

In my Sharepoint list I have one column of person or group type, I want to fetch its value on my webpart. I have even tried using $expand to get that column value but still not getting. In my webpart ...
1
vote
0answers
177 views

How to get values in textbox in webaprt in spfx

I want to display my values of sharepoint list not in a table but in respective textboxes in my web part. How can we do this in spfx(on-prem)?
1
vote
0answers
146 views

Valid App Package columb show No for a new uploaded App (On Premesis SharePoint)

Hello I am new to SharePoint, I have developed a hello world WebPart for my on premises SharePoint as shown in the SPF tutorials available on Youtube similarly I followed the tutorial for uploading a ...
7
votes
1answer
1k views

Options for elevating permissions in SharePoint Framework

Background I have a site which will have a number of Lists and a Document Library deployed as part of an SPFx application. The Document Library will have a folder hierarchy which must be strictly ...
0
votes
1answer
611 views

How do I get data from sharepoint list in webpart in spfx

I have make one web part in spfx, I am able to fetch values of all columns of sharepoint list except one which is of type person or group, In this column there are multiple names I want to fetch all ...
0
votes
2answers
85 views

How to run the SPFX source code downloaded from git hub?

i have downloaded a modern webpart spfx source code from git hub and installed the **git ** inside the solder but unable to run . please help me and also i have installed the webpart with the same ...
0
votes
1answer
434 views

What is the default format of Date in spfx

I have make one column of Date and Time in Sharepoint, now I want to fetch this Date in my web part, how it can be done What will be its Datatype and format?
0
votes
1answer
1k views

SPFX list view WebPart with react, list data loaded with PnP js, but not rendering

I have created SPFX webpart with react framework. I successfully get data from SharePoint pnp bu in react data is not loaded. When I resize browser window then data displayed successfully. Please see ...
1
vote
1answer
424 views

Fetching Sharepoint list in webpart in Sharepoint 2016 SPFx

I have added one textbox to my web part now I want to display data from sharepoint list to this textbox how it can be done in SPFx(on-premise)?
3
votes
1answer
490 views

Possible to show/hide SPFx web parts available in web part toolbox?

I have created an SPFx web part, deployed it, and added it to a page. I want to restrict other end users' ability to add the same web part to other pages. It's not a security thing, it's a tech ...
1
vote
1answer
238 views

Error when displaying HelloWorld web part in tenant workbench

My HelloWorld web part works fine in my localhost workbench. On my tenant workbench, I can add the web part but then I get the attached error instead of displaying it.
1
vote
2answers
130 views

I have upgraded from yeoman 1.3.4 to 1.4.0 and I cannot import mystrings.d.ts

I have a file mystrings.d.ts which contains :- declare interface IReactSearchBoxStrings { PropertyPaneSearchOptions: string; BasicGroupName: string; DefaultSearchResultsPageUrlFieldLabel: ...
0
votes
0answers
159 views

Why don't the SPFx web parts below the first one load on a page?

Is there a way to make sure all the content, or at least the first few web parts on a page load right away? I have a SharePoint Online classic view page that has four different custom SPFX web parts. ...
5
votes
2answers
2k views

SPFx - Cannot find type definition file for 'es6-collections'

I am trying to create a solution which will deploy the assets to SP online by following tutorial. Since this is based on version 1.4.0 i have udpated @microsoft-* packages to 1.4.0 But I am getting ...
1
vote
0answers
105 views

Separate file for html in SPFX

I am new to SPFX ad I am trying to create a separate file for my html code which I have done by doing this.domElement.innerHTML = require("./Index.html"); But I am not able to get the design that ...
1
vote
1answer
185 views

Achieving impersonation within Spfx webparts

A user fills a form in a spfx webpart. Correspondingly I have to create an item in a list for this Metadata. What I would like to do is achieve this, but restrict the user from directly accessing/...