File tree Expand file tree Collapse file tree 2 files changed +16
-8
lines changed
CustomColumnVisibilityControl
TransferModal/TransferList Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -50,10 +50,14 @@ export function CustomColumnVisibilityControl({
50
50
setOpen ( false ) ;
51
51
} ;
52
52
53
- const handleColumnVisibilityChange = ( columnName : string , isVisible : boolean ) => {
53
+ const handleColumnVisibilityChange = (
54
+ e : React . ChangeEvent < HTMLInputElement > ,
55
+ columnName : string
56
+ ) => {
57
+ e . stopPropagation ( ) ;
54
58
customToolsProps . setColumnVisibility ( ( prevState ) => ( {
55
59
...prevState ,
56
- [ columnName ] : isVisible
60
+ [ columnName ] : e . target . checked
57
61
} ) ) ;
58
62
} ;
59
63
@@ -67,7 +71,7 @@ export function CustomColumnVisibilityControl({
67
71
arrow
68
72
/>
69
73
< PopperListener
70
- style = { style }
74
+ style = { { ... style , zIndex : 1350 } }
71
75
open = { Boolean ( anchorEl ) }
72
76
anchorEl = { anchorEl }
73
77
placement = "bottom-end"
@@ -107,7 +111,7 @@ export function CustomColumnVisibilityControl({
107
111
< Checkbox
108
112
checked = { customToolsProps . columnVisibility [ col . name ] }
109
113
onChange = { ( e : React . ChangeEvent < HTMLInputElement > ) =>
110
- handleColumnVisibilityChange ( col . name , e . target . checked )
114
+ handleColumnVisibilityChange ( e , col . name )
111
115
}
112
116
/>
113
117
}
Original file line number Diff line number Diff line change @@ -180,30 +180,34 @@ function TransferList({
180
180
setChecked ( newChecked ) ;
181
181
} ;
182
182
183
- const handleAllRight = ( ) => {
183
+ const handleAllRight = ( e : React . MouseEvent ) => {
184
+ e . stopPropagation ( ) ;
184
185
setRight ( right . concat ( left ) ) ;
185
186
setLeft ( [ ] ) ;
186
187
setLeftCount ( 0 ) ;
187
188
setRightCount ( ( prevRightCount : number ) => prevRightCount + leftCount ) ;
188
189
} ;
189
190
190
- const handleCheckedRight = ( ) => {
191
+ const handleCheckedRight = ( e : React . MouseEvent ) => {
192
+ e . stopPropagation ( ) ;
191
193
setRight ( right . concat ( leftChecked ) ) ;
192
194
setLeft ( not ( left , leftChecked ) ) ;
193
195
setChecked ( not ( checked , leftChecked ) ) ;
194
196
setLeftCount ( ( prevLeftCount : number ) => prevLeftCount - leftChecked . length ) ;
195
197
setRightCount ( ( prevRightCount : number ) => prevRightCount + leftChecked . length ) ;
196
198
} ;
197
199
198
- const handleCheckedLeft = ( ) => {
200
+ const handleCheckedLeft = ( e : React . MouseEvent ) => {
201
+ e . stopPropagation ( ) ;
199
202
setLeft ( left . concat ( rightChecked ) ) ;
200
203
setRight ( not ( right , rightChecked ) ) ;
201
204
setChecked ( not ( checked , rightChecked ) ) ;
202
205
setRightCount ( ( prevRightCount : number ) => prevRightCount - rightChecked . length ) ;
203
206
setLeftCount ( ( prevLeftCount : number ) => prevLeftCount + rightChecked . length ) ;
204
207
} ;
205
208
206
- const handleAllLeft = ( ) => {
209
+ const handleAllLeft = ( e : React . MouseEvent ) => {
210
+ e . stopPropagation ( ) ;
207
211
setLeft ( left . concat ( right ) ) ;
208
212
setRight ( [ ] ) ;
209
213
setRightCount ( 0 ) ;
You can’t perform that action at this time.
0 commit comments