various improvements
This commit is contained in:
@@ -98,13 +98,11 @@ function SwipeableTabs({
|
||||
updateHeight();
|
||||
}, [activeTab, updateHeight]);
|
||||
|
||||
// Update height when content changes (after render)
|
||||
useEffect(() => {
|
||||
const timeoutId = setTimeout(updateHeight, 0);
|
||||
return () => clearTimeout(timeoutId);
|
||||
});
|
||||
|
||||
// Use ResizeObserver to watch for content size changes
|
||||
useEffect(() => {
|
||||
const activeSlideRef = slideRefs.current[activeTab];
|
||||
if (!activeSlideRef) return;
|
||||
@@ -142,6 +140,7 @@ function SwipeableTabs({
|
||||
top={0}
|
||||
style={{
|
||||
display: "flex",
|
||||
paddingInline: "var(--mantine-spacing-md)",
|
||||
marginBottom: "var(--mantine-spacing-md)",
|
||||
zIndex: 100,
|
||||
backgroundColor: "var(--mantine-color-body)",
|
||||
|
||||
Reference in New Issue
Block a user