predixdesignsystem / px-breadcrumbs

https://www.predix-ui.com/#/elements/px-breadcrumbs
Apache License 2.0
0 stars 2 forks source link

Breadcrumbs cannot be disabled dynamically #24

Open tromgy opened 5 years ago

tromgy commented 5 years ago

Expected behavior:

When I change the isSelected property of a breadcrumb item at run time the item should change its appearance and become un-/selectable.

Actual behavior:

The isSelected property only takes effect when the items are added to the component.

Steps to reproduce the problem:

in our Angular app we have the following binding:

<div>
  <px-breadcrumbs #pxBreadcrumbs [items]="bcItems" [selectedRoute]="bcSelectedRoute" [selected]="bcSelected"
    (px-breadcrumbs-item-changed)="onPxBreadcrumbsItemChanged($event)" click-only-mode></px-breadcrumbs>
</div>

when the bcItems is first initialized we can set the isSelected property and it takes effect. But when the items in bcItems are changed at run time, updating isSelected has no effect.

The same behavior can be seen on the demo page:

Screenshots (optional, but very helpful):

crumbs

tromgy commented 5 years ago

I think it would be even more useful if there was an API method or property to enable/disable the whole component.