Skip to content

Commit

Permalink
fix use index 0 for icon grid item
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiankaegy committed Aug 23, 2023
1 parent 2f471a3 commit 3ba063d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/icon-picker/icon-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ IconLabel.propTypes = {
const IconGridItem = memo((props) => {
const { columnIndex, rowIndex, style, data } = props;
const { icons, selectedIcon, onChange } = data;
const index = rowIndex * 5 + columnIndex + 1;
const index = rowIndex * 5 + columnIndex;
const icon = icons[index];
const isChecked = selectedIcon?.name === icon?.name && selectedIcon?.iconSet === icon?.iconSet;

Expand Down

0 comments on commit 3ba063d

Please sign in to comment.