mirror of
https://github.com/kemko/nomad.git
synced 2026-01-04 01:15:43 +03:00
Fix a re-render bug with flexmasonry
This commit is contained in:
@@ -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)}}
|
||||
|
||||
Reference in New Issue
Block a user