Skip to content

Commit 62b1ce7

Browse files
committed
lookup dynamic list fix
1 parent d4dc86a commit 62b1ce7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

components/SLDSIcons.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,14 @@ export const Icon = React.createClass({
6262

6363
getDefaultProps() {
6464
return {
65+
name:'',
6566
category: 'standard',
6667
};
6768
},
6869

6970
render() {
7071

71-
const name = this.props.name.replace(/_/g,'-');
72+
const name = this.props.name?this.props.name.replace(/_/g,'-'):'';
7273
const iconClassName = 'slds-icon-' + this.props.category + '-' + (this.props.theme || name);
7374
const styles = this.props.category === 'action'?{padding:'.5rem'}:null;
7475

components/SLDSLookup/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ class SLDSLookup extends React.Component {
320320
let selectedItem = this.props.items[this.state.selectedIndex].label;
321321
return <span tabIndex="0" className="slds-pill" ref={'pill-' + this.state.selectedIndex} onKeyDown={this.handlePillKeyDown.bind(this)}>
322322
<span className="slds-pill__label">
323-
<Icon category={this.props.iconCategory} name={this.props.iconName} className={this.props.iconClasses} />
323+
<Icon category={this.props.iconCategory} name={this.props.iconName?this.props.iconName:this.props.type} className={this.props.iconClasses} />
324324
{selectedItem}
325325
</span>
326326
<SLDSButton

0 commit comments

Comments
 (0)