File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed
components/SLDSPicklistBase Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ module.exports = React.createClass( {
3131 options : [ ] ,
3232 initialFocus : false ,
3333 modal : false ,
34+ className :'' ,
35+ listClassName :'' ,
3436 onClick ( ) {
3537 console . log ( 'onClick should be defined' ) ;
3638 } ,
@@ -151,6 +153,7 @@ module.exports = React.createClass( {
151153 ref = 'list'
152154 options = { this . props . options }
153155 label = { this . props . label }
156+ className = { this . props . listClassName }
154157 highlightedIndex = { this . state . highlightedIndex }
155158 selectedIndex = { this . state . selectedIndex }
156159 onSelect = { this . handleSelect }
@@ -207,7 +210,7 @@ module.exports = React.createClass( {
207210 < button
208211 id = { this . props . id }
209212 ref = "button"
210- className = " slds-button slds-button--neutral slds-picklist__label"
213+ className = { ' slds-button slds-button--neutral slds-picklist__label ' + this . props . className }
211214 aria-haspopup = "true"
212215 onBlur = { this . handleBlur }
213216 onFocus = { this . handleFocus }
Original file line number Diff line number Diff line change @@ -22,9 +22,10 @@ module.exports = React.createClass({
2222 getDefaultProps ( ) {
2323 return {
2424 options :[ ] ,
25- label :" Menu" ,
25+ label :' Menu' ,
2626 selectedIndex :- 1 ,
2727 highlightedIndex :0 ,
28+ className :'' ,
2829 onListBlur :( ) => {
2930 console . log ( "onListBlur should be overwritten" ) ;
3031 } ,
@@ -146,7 +147,7 @@ module.exports = React.createClass({
146147 return (
147148 < div
148149 ref = "scroll"
149- className = " slds-wrap slds-grow slds-scrollable--y"
150+ className = { ' slds-wrap slds-grow slds-scrollable--y ' + this . props . className }
150151 style = { {
151152 maxHeight :260
152153 } }
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ export default class HomePage extends Component {
8181 < div className = "slds-p-vertical--large" >
8282 < SLDSPicklistBase
8383 options = { [
84- { label :'A Option' , value :'A0' } ,
84+ { label :'A Option Option Super Super Long ' , value :'A0' } ,
8585 { label :'B Option' , value :'B0' } ,
8686 { label :'C Option' , value :'C0' } ,
8787 { label :'D Option' , value :'D0' } ,
@@ -90,7 +90,7 @@ export default class HomePage extends Component {
9090 { label :'B2 Option' , value :'B1' } ,
9191 { label :'C2 Option' , value :'C1' } ,
9292 { label :'D2 Option' , value :'D1' } ,
93- { label :'E2 Option' , value :'E1' } ,
93+ { label :'E2 Option Super Super Long ' , value :'E1' } ,
9494
9595
9696 ] }
You can’t perform that action at this time.
0 commit comments