Fix a re-render bug with flexmasonry
This commit is contained in:
parent
066502d408
commit
ef12488d1c
|
@ -48,7 +48,7 @@ export default class FlexMasonry extends Component {
|
|||
dc.style.order = index;
|
||||
});
|
||||
|
||||
// Gaurantee column wrapping as predicted (if the first item of a column is shorter than the difference
|
||||
// Guarantee column wrapping as predicted (if the first item of a column is shorter than the difference
|
||||
// beteen the height of the column and the previous column, then flexbox will naturally place the first
|
||||
// item at the end of the previous column).
|
||||
columns.forEach((column, index) => {
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
class="flex-masonry {{if @withSpacing "with-spacing"}} flex-masonry-columns-{{@columns}}"
|
||||
{{did-insert this.captureElement}}
|
||||
{{did-insert this.reflow}}
|
||||
{{did-update this.reflow}}>
|
||||
{{did-update this.reflow}}
|
||||
{{window-resize this.reflow}}>
|
||||
{{#each @items as |item|}}
|
||||
<div class="flex-masonry-item">
|
||||
{{yield item (action this.reflow)}}
|
||||
|
|
Loading…
Reference in New Issue