Skip to content

Commit

Permalink
fix(breadcrumb): fix wrap when expanding - FRONT-4558 (#3546)
Browse files Browse the repository at this point in the history
* fix wrap

* destroy

---------

Co-authored-by: planctus <davidepuntoferrante@gmail.com>
  • Loading branch information
emeryro and planctus authored Aug 7, 2024
1 parent cf2355d commit 91641d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export class Breadcrumb {
}
if (this.element) {
this.element.removeAttribute('data-ecl-auto-initialized');
this.element.classList.remove('ecl-breadcrumb--wrap');
ECL.components.delete(this.element);
}
}
Expand Down Expand Up @@ -208,6 +209,7 @@ export class Breadcrumb {
*/
handleFullExpand() {
this.element.classList.remove('ecl-breadcrumb--collapsed');
this.element.classList.add('ecl-breadcrumb--wrap');

if (this.onFullExpand) {
this.onFullExpand();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ $breadcrumb: null !default;
}
}

// If the component is using js, it will always be on one line
.ecl-breadcrumb[data-ecl-auto-initialized] .ecl-breadcrumb__container {
// If the component is using js, it will always be on one line, until it is expanded
.ecl-breadcrumb[data-ecl-auto-initialized]:not(.ecl-breadcrumb--wrap)
.ecl-breadcrumb__container {
flex-wrap: nowrap;

.ecl-breadcrumb__segment {
Expand Down

1 comment on commit 91641d5

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.