File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -182,6 +182,7 @@ module.exports = React.createClass( {
182182 < SLDSPopover
183183 className = 'slds-dropdown slds-dropdown--left slds-dropdown--small slds-dropdown--menu'
184184 targetElement = { this . refs . date }
185+ closeOnTabKey = { true }
185186 onClose = { this . handleCancel } >
186187 { this . getPopoverContent ( ) }
187188 </ SLDSPopover > :null
Original file line number Diff line number Diff line change @@ -36,8 +36,9 @@ module.exports = React.createClass( {
3636
3737 getDefaultProps ( ) {
3838 return {
39- targetAttachment : "bottom left" ,
40- className : "slds-dropdown"
39+ targetAttachment : 'bottom left' ,
40+ className : 'slds-dropdown' ,
41+ closeOnTabKey : false
4142 } ;
4243 } ,
4344
@@ -73,8 +74,10 @@ module.exports = React.createClass( {
7374
7475 handleKeyDown ( event ) {
7576 if ( event . keyCode === KEYS . TAB ) {
76- EventUtil . trap ( event ) ;
77- this . handleClose ( ) ;
77+ if ( this . props . closeOnTabKey ) {
78+ EventUtil . trap ( event ) ;
79+ this . handleClose ( ) ;
80+ }
7881 }
7982 } ,
8083
You can’t perform that action at this time.
0 commit comments