react-equalizer icon indicating copy to clipboard operation
react-equalizer copied to clipboard

Equalizer doesn't resize specifics nodes

Open iElsha opened this issue 5 years ago • 1 comments

Hi,

I've got an issue when I try to use Equalizer with some specifics nodes Here is the code :

`class Prestations extends Component { getNodes(equalizerComponet,equalizerElement){ return [ this.refs.node1, this.refs.node2, this.refs.node3 ] }

render() {
	return (
		<Equalizer
			byRow={true}
			property="minHeight"
			enabled={() => window.matchMedia("(min-width: 400px)").matches}
			nodes={() => this.getNodes()}>
			<Col s={12} m={4} l={3} className={""}>
				<Card cardClass={""} img={parking} imgClass={"max_70 min_70"} contentfirst={""}
				      contentsecond={"Parking"} ref={n => this.node1 = n}/>
			</Col>
			<Col s={12} m={4} l={3} className={""}>
				<Card cardClass={""} img={travail_manuel} imgClass={"max_70 min_70"} contentfirst={""}
				      contentsecond={"Travail Manuel"} ref={n => this.node2 = n}/>
			</Col>
			<Col s={12} m={4} l={3} className={""}>
				<Card cardClass={""} img={acces_pmr} imgClass={"max_70 min_70"} contentfirst={""}
				      contentsecond={"Accès aux personnes à mobilité réduite"} ref={n => this.node3 = n}/>
			</Col>
		</Equalizer>
	)
}

} `

The 3 cards doesn't have the same sizes. When I load the page I get this message error : Uncaught TypeError: Cannot read property 'style' of undefined at Function.getHeights (equalizer.js:188) at Equalizer.updateChildrenHeights (equalizer.js:146)

I haven't found more example about how to use the node features.

I'd like to know how I can match the height of my 3 cards ?

Thanks in advance for the help.

iElsha avatar Aug 29 '19 11:08 iElsha

@patrickgalbraith I still have the issue, any ideas ?

iElsha avatar Sep 01 '19 16:09 iElsha