@@ -35,13 +35,12 @@ describe('Table.resizable', () => {
35
35
const [ widthMap , setWidthMap ] = React . useState ( new Map ( ) ) ;
36
36
37
37
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 } ,
40
40
] . map ( col => ( { ...col , width : widthMap . get ( col . key ?? col . dataIndex ) || col . width } ) ) ;
41
41
42
42
return (
43
43
< Table
44
- columnResizable
45
44
data = { [ { a : '123' , b : '123' , key : '1' } ] }
46
45
columns = { columns }
47
46
scroll = { { x : columns . reduce ( ( t , c ) => t + c . width , 0 ) } }
@@ -117,13 +116,12 @@ describe('Table.resizable', () => {
117
116
const [ widthMap , setWidthMap ] = React . useState ( new Map ( ) ) ;
118
117
119
118
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 } ,
122
121
] . map ( col => ( { ...col , width : widthMap . get ( col . key ?? col . dataIndex ) || col . width || 100 } ) ) ;
123
122
124
123
return (
125
124
< Table
126
- columnResizable
127
125
style = { { width : 800 } }
128
126
data = { [ { a : '123' , b : 'xxxxxxxx' , key : '1' } ] }
129
127
columns = { columns }
@@ -203,12 +201,11 @@ describe('Table.resizable', () => {
203
201
204
202
const columns = [
205
203
{ 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 } ,
207
205
] . map ( col => ( { ...col , width : widthMap . get ( col . key ?? col . dataIndex ) || col . width } ) ) ;
208
206
209
207
return (
210
208
< Table
211
- columnResizable
212
209
data = { [ { a : '123' , b : '123' , key : '1' } ] }
213
210
columns = { columns }
214
211
scroll = { { x : columns . reduce ( ( t , c ) => t + c . width , 0 ) } }
0 commit comments