Commit 8bf51f78 authored by Dominique Feyer's avatar Dominique Feyer
Browse files

TASK: Overflow must be visible on inspector group when open

parent 854f778a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@
  font-weight: 400;
  font-size: $font-size-dark-base;
  line-height: 1.1;
  margin-bottom: $content-dark-margin;

  .label-wrapper {
    flex: 1;
+0 −1
Original line number Diff line number Diff line
@@ -7,7 +7,6 @@
  font-weight: 400;
  font-size: $font-size-dark-base;
  line-height: 1.1;
  margin-bottom: $content-dark-margin;

  input {
    background-color: $background-dark-color;
+17 −1
Original line number Diff line number Diff line
@@ -12,18 +12,34 @@ export class InspectorGroup {
  @Prop() closed: boolean = false;

  @State() isOpen : boolean;
  @State() isVisible : boolean;

  @Listen('neosVisibilitySwitched')
  neosVisibilitySwitchedHandler(event: CustomEvent) {
    this.isOpen = event.detail;
    this.queueVisibiltyChange();
  }

  componentDidLoad() {
    this.isOpen = !this.closed;
    this.queueVisibiltyChange();
  }

  queueVisibiltyChange() {
    if (this.isOpen) {
      setTimeout(() => {
        this.isVisible = true;
      }, 200);
    } else {
      this.isVisible = false;
    }
  }

  wrapperClassName() {
    return classnames('content-wrapper', {'content-wrapper--open': this.isOpen});
    return classnames('content-wrapper', {
      'content-wrapper--open': this.isOpen,
      'content-wrapper--visible': this.isVisible,
    });
  }

  render() {
+1 −1
Original line number Diff line number Diff line
@@ -9,10 +9,10 @@
  .content-wrapper {
    transition: max-height 600ms ease-in-out;
    max-height: 0;
    overflow: hidden;

    &--open {
      max-height: 1000px;
      height: auto;
    }
  }

+6 −2
Original line number Diff line number Diff line
@@ -15,11 +15,15 @@
  }

  .content-wrapper {
    overflow: hidden;
    height: auto;
    overflow: hidden;

    &--closed {
    &--open {
      height: 0;
    }

    &--visible {
      overflow: visible;
    }
  }
}
Loading