@@ -33,7 +33,6 @@ class RowItem extends Component {
3333 }
3434
3535 shouldComponentUpdate ( nextProps , nextState ) {
36-
3736 if ( nextProps . selectedItems !== this . props . selectedItems ) {
3837 if (
3938 this . props . selectedItems . includes ( this . props . item [ this . props . uniqueKey ] ) &&
@@ -70,7 +69,6 @@ class RowItem extends Component {
7069 ) {
7170 return true
7271 }
73-
7472 }
7573
7674 if ( this . props . searchTerm !== nextProps . searchTerm ) {
@@ -172,7 +170,11 @@ class RowItem extends Component {
172170 )
173171 _renderSelectedIcon = ( ) => {
174172 const {
175- item, selectedIconComponent, mergedColors, unselectedIconComponent,
173+ item,
174+ selectedIconComponent,
175+ mergedColors,
176+ unselectedIconComponent,
177+ iconRenderer : Icon ,
176178 } = this . props
177179 return this . _itemSelected ( item )
178180 ? callIfFunction ( selectedIconComponent ) || (
@@ -205,6 +207,7 @@ class RowItem extends Component {
205207 displayKey,
206208 selectedItems,
207209 iconKey,
210+ iconRenderer : Icon ,
208211 } = this . props
209212 const hasDropDown = item [ subKey ] && item [ subKey ] . length > 0 && showDropDowns
210213
@@ -235,7 +238,12 @@ class RowItem extends Component {
235238 >
236239 { selectedIconOnLeft && this . _renderSelectedIcon ( ) }
237240 { iconKey && item [ iconKey ] && (
238- < ItemIcon iconKey = { iconKey } icon = { item [ iconKey ] } style = { mergedStyles . itemIconStyle } />
241+ < ItemIcon
242+ iconRenderer = { Icon }
243+ iconKey = { iconKey }
244+ icon = { item [ iconKey ] }
245+ style = { mergedStyles . itemIconStyle }
246+ />
239247 ) }
240248 < Text
241249 numberOfLines = { itemNumberOfLines }
0 commit comments