Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

innerElementType doesn't work #754

Open
herzaso opened this issue Feb 8, 2024 · 0 comments
Open

innerElementType doesn't work #754

herzaso opened this issue Feb 8, 2024 · 0 comments

Comments

@herzaso
Copy link

herzaso commented Feb 8, 2024

I have this code:

const InnerElementType = forwardRef<HTMLUListElement>(({ ...rest }, ref) => <ul ref={ref} {...rest} />);
...
        <AutoSizer className='h-40 w-full'>
          {({ width, height }: { width: number; height: number }) => (
            <FixedSizeList
              height={height}
              width={width}
              itemSize={56}
              itemCount={items.length}
              innerElementType={InnerElementType}
            >
              Item {items[index]}
            </FixedSizeList>
          )}
      </AutoSizer>

and I don't see any ul in the DOM. Am I doing something wrong?
For completeness, this is just a test since what I really want to do is to add a className to the inner component

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant