) => {
+ // eslint-disable-next-line streamlit-custom/no-force-reflow-access -- Safe: layout already computed during scroll event
+ scrollTopRef.current = e.currentTarget.scrollTop
+ },
+ []
+ )
+
+ // Memoized to prevent BaseWeb from remounting on every render
+ const ValueContainer = useMemo(
+ () =>
+ // eslint-disable-next-line @eslint-react/no-nested-component-definitions -- Required for baseweb component override with refs
+ function ValueContainer(
+ props: SharedStylePropsArg & { children: React.ReactNode }
+ ): React.ReactElement {
+ return (
+
+ )
+ },
+ [handleValueContainerScroll]
+ )
+
return (
= props => {
}),
},
ValueContainer: {
+ component: ValueContainer,
style: () => ({
overflowY: "auto",
paddingLeft: theme.spacing.sm,