@@ -159,11 +159,21 @@ const Editor: ReturnType<ProvideEditorCallback<MultiSelectCell>> = p => {
159
159
// Apply styles to the react-select component.
160
160
// All components: https://react-select.com/components
161
161
const colorStyles : StylesConfig < SelectOption , true > = {
162
- control : base => ( {
162
+ control : ( base , state ) => ( {
163
163
...base ,
164
164
border : 0 ,
165
165
boxShadow : "none" ,
166
166
backgroundColor : theme . bgCell ,
167
+ // Allow interaction (e.g. wheel scrolling) even when the select is disabled
168
+ pointerEvents : state . isDisabled ? "auto" : base . pointerEvents ,
169
+ cursor : state . isDisabled ? "default" : base . cursor ,
170
+ } ) ,
171
+ valueContainer : base => ( {
172
+ ...base ,
173
+ // Keep default wrapping so multiple chips can move to new lines
174
+ flexWrap : base . flexWrap ?? "wrap" ,
175
+ overflowX : "auto" ,
176
+ overflowY : "hidden" ,
167
177
} ) ,
168
178
menu : styles => ( {
169
179
...styles ,
@@ -227,6 +237,8 @@ const Editor: ReturnType<ProvideEditorCallback<MultiSelectCell>> = p => {
227
237
...styles ,
228
238
backgroundColor : data . color ?? theme . bgBubble ,
229
239
borderRadius : `${ theme . roundingRadius ?? theme . bubbleHeight / 2 } px` ,
240
+ flexShrink : 0 ,
241
+ whiteSpace : "nowrap" ,
230
242
} ;
231
243
} ,
232
244
multiValueLabel : ( styles , { data, isDisabled } ) => {
@@ -249,6 +261,7 @@ const Editor: ReturnType<ProvideEditorCallback<MultiSelectCell>> = p => {
249
261
alignItems : "center" ,
250
262
display : "flex" ,
251
263
height : theme . bubbleHeight ,
264
+ whiteSpace : "nowrap" ,
252
265
} ;
253
266
} ,
254
267
multiValueRemove : ( styles , { data, isDisabled, isFocused } ) => {
@@ -343,7 +356,7 @@ const Editor: ReturnType<ProvideEditorCallback<MultiSelectCell>> = p => {
343
356
value = { resolveValues ( value , options , allowDuplicates ) }
344
357
onKeyDown = { cell . readonly ? undefined : handleKeyDown }
345
358
menuPlacement = { "auto" }
346
- menuPortalTarget = { portalElementRef ?. current ?? document . getElementById ( "portal" ) }
359
+ menuPortalTarget = { portalElementRef ?. current ?? document . getElementById ( "portal" ) }
347
360
autoFocus = { true }
348
361
openMenuOnFocus = { true }
349
362
openMenuOnClick = { true }
0 commit comments