File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change
1
+
1
2
import type { GetRowKey , Key , GetComponentProps } from '../interface' ;
2
3
import ExpandedRow from './ExpandedRow' ;
3
4
import { getColumnsKey } from '../utils/valueUtil' ;
Original file line number Diff line number Diff line change @@ -449,13 +449,20 @@ export default defineComponent<TableProps<DefaultRecordType>>({
449
449
}
450
450
} ;
451
451
let timtout ;
452
+ const updateWidth = ( width : number ) => {
453
+ if ( width !== componentWidth . value ) {
454
+ triggerOnScroll ( ) ;
455
+ componentWidth . value = fullTableRef . value ? fullTableRef . value . offsetWidth : width ;
456
+ }
457
+ } ;
452
458
const onFullTableResize = ( { width } ) => {
453
459
clearTimeout ( timtout ) ;
460
+ if ( componentWidth . value === 0 ) {
461
+ updateWidth ( width ) ;
462
+ return ;
463
+ }
454
464
timtout = setTimeout ( ( ) => {
455
- if ( width !== componentWidth . value ) {
456
- triggerOnScroll ( ) ;
457
- componentWidth . value = fullTableRef . value ? fullTableRef . value . offsetWidth : width ;
458
- }
465
+ updateWidth ( width ) ;
459
466
} , 100 ) ;
460
467
} ;
461
468
You can’t perform that action at this time.
0 commit comments