Skip to content

Instantly share code, notes, and snippets.

@mikezimm
mikezimm / my.module.scss
Last active February 21, 2020 05:23
Ulitmate styling possibilities of Fabric React components?
@import '~office-ui-fabric-react/dist/sass/References.scss';
.myWebPartClass {
//Key is using this format.... and reference this page for more details
//https://www.w3.org/TR/CSS21/selector.html%23id-selectors#type-selectors
//Basically, this will get any child elements of className={ styles.listViewTransparent }
//Then find only items where the property data-automationid = DetailsRowFields.
//You can use this syntax and others to filter on any element property, wildcard etc....
.listViewTransparent *[data-automationid="DetailsRowFields"] {
@mikezimm
mikezimm / 1 how I might call the component.ts
Last active January 15, 2020 02:08
Convert Olliver spfx 40 fantastics twitter webpart to react component
import TweetsFeedWebPart from './tweetsFeed/TweetsFeedWebPart';
export default class AboutInfo extends React.Component<IAboutInfoProps, IAboutInfoState> {
//.. stuff deleted
let twitterPane = <TweetsFeedWebPart
@mikezimm
mikezimm / Redacted TrackMyTime7.tsx
Last active January 7, 2020 03:37
TrackMyTime @pnp/sp batch call issue
//RUN TIME DETAILS:
// useProjectWeb = https://mytenant.sharepoint.com/sites/Templates/tmt/
// useTrackMyTimeWeb = https://mytenant.sharepoint.com/sites/Templates/tmt/
//RESULT:
//When I run on the same site as the 2 webs listed above, all works well with all the calls inBatch(batch)
// When I run on another subsite and am trying to call the original web:
// WORKS FINE: sp.web.currentUser.inBatch(batch)
@mikezimm
mikezimm / webpart en-us.js
Created December 19, 2019 02:15
Just an example of string naming
define([], function() {
return {
"PropertyPaneAbout": "Enter PropertyPaneAbout in strings",
"PropertyPaneDescription": "Description",
"BasicGroupName": "Group Name",
"DescriptionFieldLabel": "Description Field",
// 0 - Context
"DefaultProjectListTitle": "Projects", // DO NOT CHANGE THIS IN DIFFERENT LANGUAGES
@mikezimm
mikezimm / 1. PivotTiles - want bind onClick this & event.tsx
Last active November 11, 2019 00:45
How to bind onClick this & event?
// NOTE FOR FUTURE ReWriting:
// Check this post and see if using arrow function will work.
// https://stackoverflow.com/questions/42576198/get-object-data-and-target-element-from-onclick-event-in-react-js?fbclid=IwAR3a8oYBmVarTQy3lLfQFA-xZ8sv_0pSDd9Mag_4m3fWF9rGZuRblKK3dyg
public constructor(props:IPivotTilesProps){
super(props);
this.state = {
// .... stuff deleted //