This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import {StickyContainer} from "react-sticky"; | |
class StickyContainerCustomTag extends StickyContainer { | |
render() { | |
const tagName = this.props.tagName || 'div'; | |
const props = {...this.props}; | |
delete props.tagName; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const _ = require('lodash'); | |
// COLLECTIONS | |
// _.each => Array.prototype.forEach | |
// _.map => Array.prototype.map | |
// _.reduce => Array.prototype.reduce | |
// _.reduceRight => Array.prototype.reduceRight | |
// _.find => Array.prototype.find | |
// _.filter => Array.prototype.filter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var flattenObject = function(ob) { | |
var toReturn = {}; | |
for (var i in ob) { | |
if (!ob.hasOwnProperty(i)) continue; | |
if ((typeof ob[i]) == 'object') { | |
var flatObject = flattenObject(ob[i]); | |
for (var x in flatObject) { | |
if (!flatObject.hasOwnProperty(x)) continue; |