Skip to content

Commit

Permalink
Fix innerClass issue in query editor result inspector
Browse files Browse the repository at this point in the history
  • Loading branch information
jaclarke committed Mar 18, 2024
1 parent aaa8dfc commit bdbc63d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion shared/studio/tabs/queryEditor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,17 @@ const ResultInspector = observer(function ResultInspector({
const [height, setHeight] = useState(0);
useResize(ref, ({height}) => setHeight(height));

const [innerClass, setInnerClass] = useState<Element | null>(null);

useEffect(() => {
setInnerClass(
ref.current!.querySelector(`.${inspectorStyles.innerWrapper}`)
);
}, [height]);

return (
<div ref={ref} style={{height: "100%", minWidth: 0, width: "100%"}}>
<CustomScrollbars innerClass={inspectorStyles.innerWrapper}>
<CustomScrollbars innerClass={innerClass}>
<Inspector
className={styles.inspector}
state={state}
Expand Down

0 comments on commit bdbc63d

Please sign in to comment.