Closed DmitryTurovtsov closed 7 years ago
Hi @DimaNodeJs
Which version of react-masonry-component are you using?
Still at work right now, will do my best to look at this tonight with you.
Can you please paste up a simple reproduction of this issue on WebpackBin?
@afram "version": "5.0.3"
import React from 'react';
import GridItem from './item';
import classnames from 'classnames';
import Masonry from 'react-masonry-component';
const Grid = ({ items, masonry }) => {
const masonryOptions = {
transitionDuration: '0.6s'
};
if (items.length) { items = items.map(GridItem) }
return (
<div className={classnames('b-grid', {[`b-grid--masonry`]: masonry})} >
{ masonry ? <Masonry options={masonryOptions} >{ items }</Masonry> : items }
</div>
)
};
export default Grid;
Could it be helpful? it's almost exactly the same code I use. Mb you can find something strange in it and it's not an issue at all)) If not I'll create an example later in several hours.
I think I had to set columnWidth
property equal to smaller item.
But there is no information about it in docs((
btw thx for really quick reply and aspiration to help! )
no problem. columnWidth would be from Masonry's side. Can I close this now as resolved?
closing. Please reopen if needed.
Everything the same except position of wide element in array. Masonry is initialized but work incorrect. All elements have position-left 0...
Hope for quick reply. tnx)