vue-hxs / vue-split-layout

Draggable split panes for vuejs
MIT License
113 stars 34 forks source link

Layout does not properly render dynamic changes to nested elements. #7

Closed J-Rojas closed 5 years ago

J-Rojas commented 5 years ago

There's a huge flaw in the rendering code that prevents updates to nested elements from occurring after the initial render.

For example:

    <Layout>
        <div v-show="showMe" >Hello World</div>
    </Layout>

If showMe is changed, the layout will not properly render the changes.

The root cause of this is how the slot items are cached within the component within the created() hook. The slot items are filtered which creates a new array of items. The subsequent rendering passes will not use the changes to VNodes that may have occurred.

J-Rojas commented 5 years ago

Fix merged.