Skip to content

Commit d990c1d

Browse files
authored
Merge pull request #21 from ApacheEx/patch-1
Fix navigation when one of showCategory or showSearch is false for Single Mode
2 parents 61d01a4 + 199834c commit d990c1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/js/components/FontIconPicker.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,13 @@ class FontIconPicker extends React.PureComponent {
107107
);
108108

109109
// Set internal category to 0 if not showing category
110-
if (!nextProps.showCategory) {
110+
if (!nextProps.showCategory && prevState.currentCategory !== 0) {
111111
newState.currentCategory = 0;
112112
newState.currentPage = 0;
113113
}
114114

115115
// Set internal search to empty, if not showing search
116-
if (!nextProps.showSearch) {
116+
if (!nextProps.showSearch && prevState.currentSearch !== '') {
117117
newState.currentSearch = '';
118118
newState.currentPage = 0;
119119
}

0 commit comments

Comments
 (0)