File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ export function RequestsPage() {
8383 const [ scrollTop , setScrollTop ] = useState ( 0 ) ;
8484 const [ viewportHeight , setViewportHeight ] = useState ( 0 ) ;
8585 const [ rowHeight , setRowHeight ] = useState ( DEFAULT_ROW_HEIGHT ) ;
86+ const rowHeightRef = useRef ( DEFAULT_ROW_HEIGHT ) ;
8687 const rowMeasureObserver = useRef < ResizeObserver | null > ( null ) ;
8788
8889 const handleContainerRef = useCallback ( ( node : HTMLDivElement | null ) => {
@@ -248,7 +249,8 @@ export function RequestsPage() {
248249
249250 const updateHeight = ( ) => {
250251 const nextHeight = node . getBoundingClientRect ( ) . height ;
251- if ( nextHeight > 0 && Math . abs ( nextHeight - rowHeight ) > 0.5 ) {
252+ if ( nextHeight > 0 && Math . abs ( nextHeight - rowHeightRef . current ) > 0.5 ) {
253+ rowHeightRef . current = nextHeight ;
252254 setRowHeight ( nextHeight ) ;
253255 }
254256 } ;
@@ -264,7 +266,7 @@ export function RequestsPage() {
264266 observer . observe ( node ) ;
265267 rowMeasureObserver . current = observer ;
266268 }
267- } , [ rowHeight ] ) ;
269+ } , [ ] ) ;
268270
269271 return (
270272 < div className = "flex flex-col h-full bg-background" >
You can’t perform that action at this time.
0 commit comments