Skip to content

Breadcrumb renders divider incorrectly when overflow item is at last index #4786

Description

@bcarthic

Bug Report

Priorities and help requested (not applicable if asking question):

Priority: Normal

Are you willing to submit a PR to fix? (Yes)

Describe the issue:

  1. The Breadcrumb component renders the divider to the last item when overflow index is set to the last item.
  2. And also the divider is not rendered next to the normal item for the case A > ...

In the first scenario, we don't check last index when rendering overflow item
In second scenario, we need to allow to render divider if there is a overflow item.

Actual behavior:

<Breadcrumb
items={ [
{ text: 'TestText1', key: 'TestKey1' },
{ text: 'TestText2', key: 'TestKey2' },
{ text: 'TestText3', key: 'TestKey3' },
{ text: 'TestText4', key: 'TestKey4' }
] }
maxDisplayedItems={ 1 }
overflowIndex={ 1 }
/>
image

Expected behavior:

image

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions