@@ -817,9 +817,7 @@ const DataEditorImpl: React.ForwardRefRenderFunction<DataEditorRef, DataEditorPr
817
817
return window . getComputedStyle ( document . documentElement ) ;
818
818
} , [ ] ) ;
819
819
820
- const fontSizeStr = docStyle . fontSize ;
821
-
822
- const remSize = React . useMemo ( ( ) => Number . parseFloat ( fontSizeStr ) , [ fontSizeStr ] ) ;
820
+ const remSize = React . useMemo ( ( ) => Number . parseFloat ( docStyle . fontSize ) , [ docStyle ] ) ;
823
821
824
822
const { rowHeight, headerHeight, groupHeaderHeight, theme, overscrollX, overscrollY } = useRemAdjuster ( {
825
823
groupHeaderHeight : groupHeaderHeightIn ,
@@ -856,13 +854,10 @@ const DataEditorImpl: React.ForwardRefRenderFunction<DataEditorRef, DataEditorPr
856
854
} , [ gridSelectionOuter , rowMarkerOffset ] ) ;
857
855
const gridSelection = gridSelectionOuterMangled ?? gridSelectionInner ;
858
856
859
- const abortControllerRef = React . useRef ( new AbortController ( ) ) ;
860
- React . useEffect ( ( ) => {
861
- return ( ) => {
862
- // eslint-disable-next-line react-hooks/exhaustive-deps
863
- abortControllerRef ?. current . abort ( ) ;
864
- } ;
865
- } , [ ] ) ;
857
+ const abortControllerRef = React . useRef ( ) as React . MutableRefObject < AbortController > ;
858
+ if ( abortControllerRef . current === undefined ) abortControllerRef . current = new AbortController ( ) ;
859
+
860
+ React . useEffect ( ( ) => ( ) => abortControllerRef ?. current . abort ( ) , [ ] ) ;
866
861
867
862
const [ getCellsForSelection , getCellsForSeletionDirect ] = useCellsForSelection (
868
863
getCellsForSelectionIn ,
0 commit comments