Skip to content

List onOrder - Hide index of items #7266

@stcsaba

Description

@stcsaba

Is this something you or your team is interested in contributing a pull request towards?

Expected Behavior

The List component should be able to hide the index of the items if the onOrder function is given.

Actual Behavior

On each line there is a row number (index + 1 value) if the onOrder function is given.

URL, screen shot, or Codepen exhibiting the issue

image

                  <StyledItem
                    key={key}
                    tag="li"
                    background={adjustedBackground}
                    border={adjustedBorder}
                    isDisabled={isDisabled}
                    flex={false}
                    pad={pad || theme.list.item.pad}
                    {...defaultItemProps}
                    {...boxProps}
                    {...clickProps}
                    {...orderProps}
                    {...itemAriaProps}
                  >
                    {onOrder && <Text color={pinnedColor}>{index + 1}</Text>} // this line should be optional
                    {content}
                    {displayPinned}
                    {orderControls}
                  </StyledItem>

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementA suggestion to add to or change behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions