-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementing the PlaceHolder Content Control #1
Comments
Did not have the time yet to check it, but have you already tested the sample web part? You can find it here: https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/pnp-controls |
Thanks! I'll definitely take a look at these samples. |
My code was close. I over-complicated getting the context. |
Fixed Align Left button not working.
[ ] Enhancement
[ ] Bug
[ X ] Question
Version
[email protected]
Question - Easier way to implement the Place Holder control?
I'm new to React and to SPFx. :-)
The relevant files are attached in a .zip
Primary questions
I was able to get the PlaceHolder content control to work but I'm wondering if there's a better way.
My project is called React00 so this is the prefix for all the files.
I put the <Placeholder markup in the React00.tsx file (attached) that has the default React Welcome code.
I got the context from the React00WebPart.ts.
To do that, I used code from a previous project that uses the pnp object in the sp-pnp-js package. After installing the package.
To get it from the WebPart to the React file, I added a WebPartContext property to the IReact00Props.ts interface.
This all works as expected but I'm curious if there's a simpler route.
Thanks!
PlaceHolderSPFxCode.zip
The text was updated successfully, but these errors were encountered: