diff --git a/src/js/components/FipIconContainer.jsx b/src/js/components/FipIconContainer.jsx index cf106fc..f8d5345 100644 --- a/src/js/components/FipIconContainer.jsx +++ b/src/js/components/FipIconContainer.jsx @@ -119,15 +119,10 @@ class FipIconContainer extends React.PureComponent { iconSet.forEach((value, index) => { if (fuzzySearch(searchString, currentSearchSet[index])) { - if (!nIconSet.includes(value)) { - nIconSet.push(value); - } - if (!nSearchSet.includes(currentSearchSet[index])) { - nSearchSet.push(currentSearchSet[index]); - } + nIconSet.push(value); + nSearchSet.push(currentSearchSet[index]); } }); - return { activeIcons: nIconSet, activeTitles: nSearchSet, @@ -245,42 +240,40 @@ class FipIconContainer extends React.PureComponent { if (this.state.totalPage < 1) { return null; } - const left = - this.props.currentPage > 0 ? ( + const left = ( + this.handlePageKeyBoard(event, 'prev')} + onClick={event => this.handleChangePage(event, 'prev')} + > this.handlePageKeyBoard(event, 'prev')} - onClick={event => this.handleChangePage(event, 'prev')} + role="presentation" + className="rfipicons__label" + aria-label="Left" > - - - + - ) : null; - const right = - this.props.currentPage < this.state.totalPage - 1 ? ( + + ); + const right = ( + this.handlePageKeyBoard(event, 'next')} + onClick={event => this.handleChangePage(event, 'next')} + > this.handlePageKeyBoard(event, 'next')} - onClick={event => this.handleChangePage(event, 'next')} + role="presentation" + className="rfipicons__label" + aria-label="Right" > - - - + - ) : null; + + ); return (