splitpanes icon indicating copy to clipboard operation
splitpanes copied to clipboard

Panes resized when added a new pane

Open elC0mpa opened this issue 4 years ago • 4 comments

Hello, first of all I would like to thank you for this amazing Vue Component. I am having a problem and I don´t know how to solve it. The thing is that when I add a new pane to the component, the master pane (left pane) is resized and I would like to avoid this behavior. Here I let you my code:

<splitpanes
        class="default-theme"
        @pane-remove="removed"
        @pane-add="added"
        @resized="resized"
      >
        <!-- Master -->
        <pane
          v-if="showMasterPanel"
          :min-size="masterPanelMinSize"
          :max-size="masterPanelMaxSize"
          :size="masterPanelSize"
          class="splitter-master-details__master"
        >
          <slot name="master-content"></slot>
        </pane>

        <!-- Detail -->
        <pane
          :min-size="detailsPanelMinSize"
          :max-size="detailsPanelMaxSize"
          :size="detailsPanelSize"
          class="splitter-master-details__detail"
        >
          <slot name="details-content"></slot>
        </pane>

        <!-- Extra -->
        <pane
          v-if="showExtraPanel"
          :min-size="extraPanelMinSize"
          :max-size="extraPanelMaxSize"
          class="splitter-master-details__extra"
        >
          <slot name="extra-content"></slot>
        </pane>
      </splitpanes>

In this code the variable showMasterPanel is always true but showExtraPanel is the one which changes its value and by changing this variable the events pane-add and pane-removed are fired.

I hope you could help me

elC0mpa avatar May 07 '21 22:05 elC0mpa