Skip to content

react-table: TableCellLayout has wrapper, it is a confusing name for slot #26203

@layershifter

Description

@layershifter

Problem

TableCellLayout has a wrapper slot that wraps content:

{slots.wrapper && (
<slots.wrapper {...slotProps.wrapper}>
{slots.main && <slots.main {...slotProps.main}>{slotProps.root.children}</slots.main>}
{slots.description && <slots.description {...slotProps.description} />}
</slots.wrapper>
)}

From its name it creates following expectation:

  return (
     <slots.wrapper {...slotProps.wrapper}>
        <slots.root {...slotProps.root}/>
     </slots.wrapper>
  )

Suggestion: rename slot to content/contentWrapper

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions