Skip to content

Comp API + Vuetify + Reference = ♾ update loop #1604

Open
@Stoom

Description

@Stoom

Version

1.0.3

Subject of the issue

It looks like if you add a ref to any Vuetify component (I tested VForm, VBtn, and VCard) with @vue/composition-api then it displays the infinite update loop message and fails the test.

[Update]:
It looks like it has to do with updating the input and having a ref. If you remove the ref to the button or the v-model on the input the error goes away. I'm pretty sure that the v-text-field uses requestAnimationFrame as well.

Steps to reproduce

<template>
  <v-form>
    <v-text-field v-model="name"></v-text-field>
    <v-btn ref="foobar">
  </v-form>
</template>

<script lang="ts">
  import { defineComponent, ref } from '@vue/composition-api';

  export default defineComponent({
    setup: () => {
      const name = ref('');
      const foobar = ref<HTMLElement>(null);
      return { name, foobar };
    }
  });
</script>

Expected behavior

The tests to pass with no warning

Actual behavior

[Vue warn]: You may have an infinite update loop in a component render function.

found in

---> <TestComponent> at src/components/TestComponent.vue
       <Root>
      1) Should be enabled when valid

Possible Solution

Most likely related to #1407 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions