diff --git a/packages/ui/table/package.json b/packages/ui/table/package.json index 395551a1b..ca1f40198 100644 --- a/packages/ui/table/package.json +++ b/packages/ui/table/package.json @@ -1,6 +1,6 @@ { "name": "@hi-ui/table", - "version": "4.1.3-alpha.0", + "version": "4.1.3-alpha.1", "description": "A sub-package for @hi-ui/hiui.", "keywords": [], "author": "HiUI ", diff --git a/packages/ui/table/src/hooks/use-col-width.ts b/packages/ui/table/src/hooks/use-col-width.ts index e6ee46307..9a6b5e77a 100644 --- a/packages/ui/table/src/hooks/use-col-width.ts +++ b/packages/ui/table/src/hooks/use-col-width.ts @@ -70,17 +70,18 @@ export const useColWidth = ({ const resizeObserver = new ResizeObserver(() => { if (virtual) { setColWidths(getVirtualWidths()) - } else { - if (measureRowElement.childNodes) { - const _realColumnsWidth = Array.from(measureRowElement.childNodes).map((node) => { - return (node as HTMLElement).getBoundingClientRect().width || 0 - }) - - if (_realColumnsWidth.some((width) => width && width > 0)) { - setColWidths(_realColumnsWidth) - } - } } + // else { + // if (measureRowElement.childNodes) { + // const _realColumnsWidth = Array.from(measureRowElement.childNodes).map((node) => { + // return (node as HTMLElement).getBoundingClientRect().width || 0 + // }) + + // if (_realColumnsWidth.some((width) => width && width > 0)) { + // setColWidths(_realColumnsWidth) + // } + // } + // } }) resizeObserver.observe(measureRowElement)