@@ -35,13 +35,12 @@ describe('Table.resizable', () => {
3535 const [ widthMap , setWidthMap ] = React . useState ( new Map ( ) ) ;
3636
3737 const columns = [
38- { key : 'a' , dataIndex : 'a' , width : 400 } ,
39- { key : 'b' , dataIndex : 'b' , width : 400 } ,
38+ { key : 'a' , dataIndex : 'a' , width : 400 , resizable : true } ,
39+ { key : 'b' , dataIndex : 'b' , width : 400 , resizable : true } ,
4040 ] . map ( col => ( { ...col , width : widthMap . get ( col . key ?? col . dataIndex ) || col . width } ) ) ;
4141
4242 return (
4343 < Table
44- columnResizable
4544 data = { [ { a : '123' , b : '123' , key : '1' } ] }
4645 columns = { columns }
4746 scroll = { { x : columns . reduce ( ( t , c ) => t + c . width , 0 ) } }
@@ -117,13 +116,12 @@ describe('Table.resizable', () => {
117116 const [ widthMap , setWidthMap ] = React . useState ( new Map ( ) ) ;
118117
119118 const columns = [
120- { key : 'a' , dataIndex : 'a' , width : 100 } ,
121- { key : 'b' , dataIndex : 'b' , width : 100 } ,
119+ { key : 'a' , dataIndex : 'a' , width : 100 , resizable : true } ,
120+ { key : 'b' , dataIndex : 'b' , width : 100 , resizable : true } ,
122121 ] . map ( col => ( { ...col , width : widthMap . get ( col . key ?? col . dataIndex ) || col . width || 100 } ) ) ;
123122
124123 return (
125124 < Table
126- columnResizable
127125 style = { { width : 800 } }
128126 data = { [ { a : '123' , b : 'xxxxxxxx' , key : '1' } ] }
129127 columns = { columns }
@@ -203,12 +201,11 @@ describe('Table.resizable', () => {
203201
204202 const columns = [
205203 { key : 'a' , dataIndex : 'a' , width : 800 , resizable : { minWidth : 400 } } ,
206- { key : 'b' , dataIndex : 'b' , width : 800 } ,
204+ { key : 'b' , dataIndex : 'b' , width : 800 , resizable : true } ,
207205 ] . map ( col => ( { ...col , width : widthMap . get ( col . key ?? col . dataIndex ) || col . width } ) ) ;
208206
209207 return (
210208 < Table
211- columnResizable
212209 data = { [ { a : '123' , b : '123' , key : '1' } ] }
213210 columns = { columns }
214211 scroll = { { x : columns . reduce ( ( t , c ) => t + c . width , 0 ) } }
0 commit comments