MINOR: fix the glossary pagination issue (#19954)

* fix the glossary infinite scroll issue

* remove unwanted height
This commit is contained in:
Ashish Gupta 2025-02-25 10:20:15 +05:30 committed by GitHub
parent a41c14c546
commit e9e0ed0968
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View File

@ -22,7 +22,8 @@ const PanelContainer: React.FC<React.PropsWithChildren<PanelContainerProps>> =
return (
<div
className={classNames(className, 'panel-container')}
data-testid="panel-container">
data-testid="panel-container"
id="panel-container">
{overlay && width <= overlay.displayThreshold && (
<div className="light-overlay">
<Typography.Title

View File

@ -79,7 +79,8 @@ const GlossaryPage = () => {
useState<boolean>(false);
const [elementRef, isInView] = useElementInView({
...observerOptions,
rootMargin: '10px',
root: document.querySelector('#panel-container'),
rootMargin: '0px 0px 2px 0px',
});
const { paging, pageSize, handlePagingChange } = usePaging();
@ -492,8 +493,9 @@ const GlossaryPage = () => {
<>
<GlossaryLeftPanel glossaries={glossaries} />
<div
className="h-[1px] w-full"
className="w-full"
data-testid="glossary-left-panel-scroller"
id="observer-element"
ref={elementRef as RefObject<HTMLDivElement>}
/>
{isMoreGlossaryLoading && <Loader />}