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+ // base rc-table@7.17.2
12import type { GetRowKey , Key , GetComponentProps } from '../interface' ;
23import ExpandedRow from './ExpandedRow' ;
34import { getColumnsKey } from '../utils/valueUtil' ;
Original file line number Diff line number Diff line change @@ -449,13 +449,20 @@ export default defineComponent<TableProps<DefaultRecordType>>({
449449 }
450450 } ;
451451 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+ } ;
452458 const onFullTableResize = ( { width } ) => {
453459 clearTimeout ( timtout ) ;
460+ if ( componentWidth . value === 0 ) {
461+ updateWidth ( width ) ;
462+ return ;
463+ }
454464 timtout = setTimeout ( ( ) => {
455- if ( width !== componentWidth . value ) {
456- triggerOnScroll ( ) ;
457- componentWidth . value = fullTableRef . value ? fullTableRef . value . offsetWidth : width ;
458- }
465+ updateWidth ( width ) ;
459466 } , 100 ) ;
460467 } ;
461468
You can’t perform that action at this time.
0 commit comments