File tree Expand file tree Collapse file tree 2 files changed +21
-6
lines changed
Expand file tree Collapse file tree 2 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -119,10 +119,15 @@ class FipIconContainer extends React.PureComponent {
119119
120120 iconSet . forEach ( ( value , index ) => {
121121 if ( fuzzySearch ( searchString , currentSearchSet [ index ] ) ) {
122- nIconSet . push ( value ) ;
123- nSearchSet . push ( currentSearchSet [ index ] ) ;
122+ if ( ! nIconSet . includes ( value ) ) {
123+ nIconSet . push ( value ) ;
124+ }
125+ if ( ! nSearchSet . includes ( currentSearchSet [ index ] ) ) {
126+ nSearchSet . push ( currentSearchSet [ index ] ) ;
127+ }
124128 }
125129 } ) ;
130+
126131 return {
127132 activeIcons : nIconSet ,
128133 activeTitles : nSearchSet ,
Original file line number Diff line number Diff line change @@ -225,10 +225,20 @@ class FontIconPicker extends React.PureComponent {
225225 this . closeDropdown ( ) ;
226226 }
227227 } ;
228- isClickWithin = /* istanbul ignore next */ target =>
229- this . fipButtonRef . current . contains ( target ) ||
230- ( this . fipDropDownRef . current &&
231- this . fipDropDownRef . current . contains ( target ) ) ;
228+ isClickWithin = /* istanbul ignore next */ target => {
229+ if (
230+ target . className === 'fipicon-angle-left' ||
231+ target . className === 'fipicon-angle-right' ||
232+ target . className === 'rfipicons__label'
233+ ) {
234+ return true ;
235+ }
236+ return (
237+ this . fipButtonRef . current . contains ( target ) ||
238+ ( this . fipDropDownRef . current &&
239+ this . fipDropDownRef . current . contains ( target ) )
240+ ) ;
241+ } ;
232242
233243 /**
234244 * Handle the dropdown open thingy.
You can’t perform that action at this time.
0 commit comments