@@ -58,7 +58,7 @@ class SelectEditor extends React.Component {
58
58
value : gettext ( 'Add custom permission' ) ,
59
59
isDisabled : true ,
60
60
label : (
61
- < div className = "btn-add-custom-permission" onClick = { this . props . onAddCustomPermissionToggle } >
61
+ < div className = "permission-editor- btn-add-custom-permission" onClick = { this . props . onAddCustomPermissionToggle } >
62
62
< i className = "fa fa-plus" > </ i >
63
63
< span > { gettext ( 'Add custom permission' ) } </ span >
64
64
</ div >
@@ -108,6 +108,28 @@ class SelectEditor extends React.Component {
108
108
render ( ) {
109
109
let { currentOption, isTextMode } = this . props ;
110
110
111
+ const MenuSelectStyle = {
112
+ option : ( provided , state ) => {
113
+ const { isDisabled, isSelected, isFocused } = state ;
114
+ return ( {
115
+ ...provided ,
116
+ cursor : isDisabled ? 'default' : 'pointer' ,
117
+ //backgroundColor: isSelected ? '#5A98F8' : (isFocused ? '#f5f5f5' : '#fff'),
118
+ '.header-icon .dtable-font' : {
119
+ color : isSelected ? '#fff' : '#aaa' ,
120
+ } ,
121
+ } ) ;
122
+ } ,
123
+ control : ( provided ) => ( {
124
+ ...provided ,
125
+ fontSize : '14px' ,
126
+ cursor : 'pointer' ,
127
+ lineHeight : '1.5' ,
128
+ } ) ,
129
+ menuPortal : base => ( { ...base , zIndex : 9999 } ) ,
130
+ indicatorSeparator : ( ) => { } ,
131
+ } ;
132
+
111
133
// scence1: isTextMode (text)editor-icon --> select
112
134
// scence2: !isTextMode select
113
135
return (
@@ -121,6 +143,11 @@ class SelectEditor extends React.Component {
121
143
value = { currentOption }
122
144
onChange = { this . onOptionChanged }
123
145
captureMenuScroll = { false }
146
+ menuPlacement = "auto"
147
+ menuPosition = { 'fixed' }
148
+ menuPortalTarget = { document . querySelector ( '#wrapper' ) }
149
+ styles = { MenuSelectStyle }
150
+ menuShouldScrollIntoView
124
151
/>
125
152
}
126
153
{ ( isTextMode && ! this . state . isEditing ) &&
0 commit comments