Skip to content

Optional HTML element type #3

Open
@Dalez

Description

@Dalez

Awesome library!

Would it be possibly to add in a option HTML element type? We want to use this in a table (for a long list of products), but obviously cannot have a div inside of a table. I've edited the code to this:

  return (
    <tr ref={intersectionRef}>{isVisible ? <>{children}</> : <td style={{ height: placeholderHeight.current }} />}</tr>
  );

And it works flawlessly, but would love an option to tell the library what we want returned, e.g. a div like in the current code, or a tr/td like above.

Would that be possible? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions