Skip to content

Commit 89eee3d

Browse files
fix/ GridView - incorrect rowCount implies wrong margin (#1748)
1 parent 50ad345 commit 89eee3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/gridView/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ class GridView extends UIComponent<GridViewProps, GridViewState> {
181181

182182
const {numColumns = DEFAULT_NUM_COLUMNS} = this.state;
183183
const itemsCount = _.size(items);
184-
const rowCount = itemsCount / numColumns;
184+
const rowCount = Math.ceil(itemsCount / numColumns);
185185
const isLastItemInRow = (index + 1) % numColumns === 0;
186186
const isLastRow = index + 1 > (rowCount - 1) * numColumns;
187187
const isLastItem = index === itemsCount - 1;

0 commit comments

Comments
 (0)