77 ReactNode ,
88 useCallback ,
99 useRef ,
10- useEffect
10+ useEffect ,
11+ Fragment
1112} from 'react' ;
1213import { Th , ThProps } from '@patternfly/react-table' ;
1314import { Button , getLanguageDirection } from '@patternfly/react-core' ;
@@ -90,7 +91,7 @@ export const DataViewTh: FC<DataViewThProps> = ({
9091} : DataViewThProps ) => {
9192 const thRef = useRef < HTMLTableCellElement > ( null ) ;
9293
93- const [ width , setWidth ] = useState ( resizableProps ?. width ? resizableProps . width : 0 ) ;
94+ const [ width , setWidth ] = useState ( resizableProps ?. width ? resizableProps . width : 0 ) ;
9495 // Tracks the current column width for the onResize callback, because the width state is not updated until after the resize is complete
9596 const trackedWidth = useRef ( 0 ) ;
9697 const classes = useStyles ( ) ;
@@ -123,7 +124,7 @@ export const DataViewTh: FC<DataViewThProps> = ({
123124
124125 const observed = resizeButtonRef . current ;
125126 const observer = new IntersectionObserver (
126- ( [ entry ] ) => {
127+ ( [ entry ] ) => {
127128 isInView . current = entry . isIntersecting ;
128129 } ,
129130 { threshold : 0.3 }
@@ -145,7 +146,7 @@ export const DataViewTh: FC<DataViewThProps> = ({
145146 setWidth ( thRef . current ?. getBoundingClientRect ( ) . width || 0 ) ;
146147 setInitialVals . current = false ;
147148 }
148- } , [ isResizable , hasResizableColumns , setInitialVals ] ) ;
149+ } , [ isResizable , hasResizableColumns , setInitialVals ] ) ;
149150
150151 const setDragOffset = ( e : ReactMouseEvent | ReactTouchEvent ) => {
151152 const isRTL = getLanguageDirection ( thRef . current as HTMLElement ) === 'rtl' ;
@@ -305,7 +306,7 @@ export const DataViewTh: FC<DataViewThProps> = ({
305306 } ;
306307
307308 const resizableContent = (
308- < >
309+ < Fragment >
309310 < div aria-live = "polite" className = "pf-v6-screen-reader" >
310311 { screenReaderText }
311312 </ div >
@@ -320,7 +321,7 @@ export const DataViewTh: FC<DataViewThProps> = ({
320321 aria-label = { resizeButtonAriaLabel }
321322 className = { classes . dataViewResizableButton }
322323 />
323- </ >
324+ </ Fragment >
324325 ) ;
325326
326327 return (
0 commit comments