Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug transition with el-form-item #667

Closed
bioleyl opened this issue Oct 26, 2016 · 3 comments
Closed

Bug transition with el-form-item #667

bioleyl opened this issue Oct 26, 2016 · 3 comments

Comments

@bioleyl
Copy link

bioleyl commented Oct 26, 2016

There is a small bug happening sometimes when using a transition and a v-if on an el-select.
Here is a code sample: (Sorry it's big)

<template>
  <el-form label-position="left" label-width="80px" label-align="right" ref="form" :model="form" @submit.prevent="onSubmit">
    <el-button @click.native="toggleEdit">Toggle EditMode</el-button>
    <el-form-item label="Test">
      <transition name="fade" mode="out-in">
        <el-select v-if="editMode" v-model="form.text" placeholder="Sélectionner">
          <el-option v-for="item in items" :label="item.label" :value="item.value"></el-option>
        </el-select>
        <div v-else class="text">{{ form.text }}</div>
      </transition>
    </el-form-item>
  </el-form>
</template>

<script>
  export default {
    data () {
      return {
        editMode: true,
        form: {
          text: 'test'
        },
        items: [
          {
            label: 'label1',
            value: 'value1'
          },
          {
            label: 'label2',
            value: 'value2'
          },
          {
            label: 'label3',
            value: 'value1'
          }
        ]
      }
    },
    methods: {
      onSubmit () {
        console.log('submit')
      },
      toggleEdit () {
        this.editMode = !this.editMode
      }
    }
  }
</script>

If you toggle it will hapend a:

element-ui.common.js?a187:662 Uncaught (in promise) DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.

but if you remove the transition it never hapens. I was trying with different components, for now it's just on the el-select.

@Leopoldthecoder
Copy link
Contributor

This is a known bug and fixed in #617

@bioleyl
Copy link
Author

bioleyl commented Oct 26, 2016

Sorry I have problem to read chineese ;-)

@Leopoldthecoder
Copy link
Contributor

No problem. We totally understand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants