mi6 / ic-ui-kit

Intelligence Community UI Kit (based on StencilJS)
MIT License
19 stars 23 forks source link

[ic-breadcrumb-group] collapsed prop won't update once set #1998

Open GCHQ-Developer-530 opened 2 weeks ago

GCHQ-Developer-530 commented 2 weeks ago

Summary of the bug

Once a boolean value has been set for the collapsed prop, toggling it does not update the collapsed state.

I tried moving the collapsed code from the componentWillLoad to its own private function so that it could be called from the componentWillLoad and from a @Watch but then when toggling it just adds more ... links rather than toggling between Breadcrumb 2 and ...

The collapsed prop also doesn't take immediate effect. The styling for the collapsed section also doesn't take into account the current appearance. It always takes the default styling

https://github.com/mi6/ic-ui-kit/assets/113986285/0d7db269-aab0-4804-8bc4-8f37ad76190e

🪜 How to reproduce

Tell us the steps to reproduce the problem:

  1. Go to breadcrumb playground (should be completed by the end of #1970)
  2. Toggle collapsed boolean
  3. See the error

🧐 Expected behaviour

Should be able to toggle between collapsed and uncollapsed not just by clicking the ellipses.