Skip to content

Commit

Permalink
fix(use-positioner): column count calculation (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
wjdwndud0114 committed Feb 26, 2022
1 parent 9c8f1e3 commit 8d5343b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/use-positioner.ts
Expand Up @@ -336,7 +336,7 @@ const getColumns = (
gutter = 8,
columnCount?: number
): [number, number] => {
columnCount = columnCount || Math.floor(width / (minimumWidth + gutter)) || 1;
columnCount = columnCount || Math.floor((width + gutter) / (minimumWidth + gutter)) || 1;
const columnWidth = Math.floor(
(width - gutter * (columnCount - 1)) / columnCount
);
Expand Down

0 comments on commit 8d5343b

Please sign in to comment.