File tree Expand file tree Collapse file tree
CustomColumnVisibilityControl
TransferModal/TransferList Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,10 +50,14 @@ export function CustomColumnVisibilityControl({
5050 setOpen ( false ) ;
5151 } ;
5252
53- const handleColumnVisibilityChange = ( columnName : string , isVisible : boolean ) => {
53+ const handleColumnVisibilityChange = (
54+ e : React . ChangeEvent < HTMLInputElement > ,
55+ columnName : string
56+ ) => {
57+ e . stopPropagation ( ) ;
5458 customToolsProps . setColumnVisibility ( ( prevState ) => ( {
5559 ...prevState ,
56- [ columnName ] : isVisible
60+ [ columnName ] : e . target . checked
5761 } ) ) ;
5862 } ;
5963
@@ -67,7 +71,7 @@ export function CustomColumnVisibilityControl({
6771 arrow
6872 />
6973 < PopperListener
70- style = { style }
74+ style = { { ... style , zIndex : 1350 } }
7175 open = { Boolean ( anchorEl ) }
7276 anchorEl = { anchorEl }
7377 placement = "bottom-end"
@@ -107,7 +111,7 @@ export function CustomColumnVisibilityControl({
107111 < Checkbox
108112 checked = { customToolsProps . columnVisibility [ col . name ] }
109113 onChange = { ( e : React . ChangeEvent < HTMLInputElement > ) =>
110- handleColumnVisibilityChange ( col . name , e . target . checked )
114+ handleColumnVisibilityChange ( e , col . name )
111115 }
112116 />
113117 }
Original file line number Diff line number Diff line change @@ -180,30 +180,34 @@ function TransferList({
180180 setChecked ( newChecked ) ;
181181 } ;
182182
183- const handleAllRight = ( ) => {
183+ const handleAllRight = ( e : React . MouseEvent ) => {
184+ e . stopPropagation ( ) ;
184185 setRight ( right . concat ( left ) ) ;
185186 setLeft ( [ ] ) ;
186187 setLeftCount ( 0 ) ;
187188 setRightCount ( ( prevRightCount : number ) => prevRightCount + leftCount ) ;
188189 } ;
189190
190- const handleCheckedRight = ( ) => {
191+ const handleCheckedRight = ( e : React . MouseEvent ) => {
192+ e . stopPropagation ( ) ;
191193 setRight ( right . concat ( leftChecked ) ) ;
192194 setLeft ( not ( left , leftChecked ) ) ;
193195 setChecked ( not ( checked , leftChecked ) ) ;
194196 setLeftCount ( ( prevLeftCount : number ) => prevLeftCount - leftChecked . length ) ;
195197 setRightCount ( ( prevRightCount : number ) => prevRightCount + leftChecked . length ) ;
196198 } ;
197199
198- const handleCheckedLeft = ( ) => {
200+ const handleCheckedLeft = ( e : React . MouseEvent ) => {
201+ e . stopPropagation ( ) ;
199202 setLeft ( left . concat ( rightChecked ) ) ;
200203 setRight ( not ( right , rightChecked ) ) ;
201204 setChecked ( not ( checked , rightChecked ) ) ;
202205 setRightCount ( ( prevRightCount : number ) => prevRightCount - rightChecked . length ) ;
203206 setLeftCount ( ( prevLeftCount : number ) => prevLeftCount + rightChecked . length ) ;
204207 } ;
205208
206- const handleAllLeft = ( ) => {
209+ const handleAllLeft = ( e : React . MouseEvent ) => {
210+ e . stopPropagation ( ) ;
207211 setLeft ( left . concat ( right ) ) ;
208212 setRight ( [ ] ) ;
209213 setRightCount ( 0 ) ;
You can’t perform that action at this time.
0 commit comments