Skip to content

Commit d8b068e

Browse files
committed
SLDS Picklist: Call handleSelect when props.options have changed
1 parent 0fba1ef commit d8b068e

File tree

22 files changed

+1588
-291
lines changed

22 files changed

+1588
-291
lines changed

components/SLDSPicklistBase/index.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1010
'use strict';
1111

1212
import React, {PropTypes} from 'react';
13+
import isEqual from 'lodash.isequal';
1314
import SLDSPopover from '../SLDSPopover';
1415
import List from './list';
1516
import ListItem from './list-item';
@@ -245,7 +246,8 @@ module.exports = React.createClass( {
245246
}
246247

247248

248-
if(this.props.value !== prevProps.value){
249+
if(this.props.value !== prevProps.value ||
250+
!isEqual(this.props.options, prevProps.options)){
249251
this.handleSelect(this.getIndexByValue(this.props.value));
250252
}
251253

0 commit comments

Comments
 (0)