From 30af476fdcca22c05cdb77af975d8c7e6efdb4f8 Mon Sep 17 00:00:00 2001 From: Ayesha Mazumdar Date: Tue, 30 Mar 2021 17:19:30 -0700 Subject: [PATCH] wip --- packages/gestalt/src/Table.css | 2 +- packages/gestalt/src/Table.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/gestalt/src/Table.css b/packages/gestalt/src/Table.css index 93006c40a62..68867b400ce 100644 --- a/packages/gestalt/src/Table.css +++ b/packages/gestalt/src/Table.css @@ -37,7 +37,7 @@ td div{ } .columnSticky div { - z-index: 4; + z-index: 5; } .columnStickyShadow div { diff --git a/packages/gestalt/src/Table.js b/packages/gestalt/src/Table.js index 13f80805a14..42bde6a0728 100644 --- a/packages/gestalt/src/Table.js +++ b/packages/gestalt/src/Table.js @@ -34,9 +34,10 @@ export default function Table(props: Props): Node { }, []); useEffect(() => { - document.addEventListener('scroll', updateShadows); + const target = contentRef.current; + target.addEventListener('scroll', updateShadows); return () => { - document.removeEventListener('scroll', updateShadows); + target.removeEventListener('scroll', updateShadows); }; }, [updateShadows]);