Subscribe on changes!

Slot throws warning when passed down to component and rerendered

avatar
Apr 29th 2021

Version

3.0.11

Reproduction link

Gist with SFC Link

SFC Direct Link

Steps to reproduce

Create 3 components :

  1. GrandParent - should accept some data that re-renders a slot, for example, array of objects.
  2. Parent
  3. Child

GrandParent passes down all it's slots to the Parent component:

return h(Parent, { data: this.data }, this.$slots)

Parent component should render the slot inside the Child

h(Child, {} , {
 default: () => row.key
}))

In the root app (App.vue) call the GrandParent and add a slot

<GrandParent :data="data">
    <template #cell-hello>Test</template>
  </GrandParent>

Now asynchronously update the data array and Vue will throw a read-only warning for the given slot:

Set operation on key "cell-hello" failed: target is readonly. {__vInternal: 1, cell-hello: ƒ}

What is expected?

Not to throw a warning

What is actually happening?

Throwing a warning but everything works.


This started happening after updating to 3.0.11. AFAIK this is related to #3523 and started happening after this update.

avatar
May 13th 2021

Hi,

I think this should be escalated and not flagged as a P3-monor-bug...

https://github.com/vueComponent/ant-design-vue/issues/3998#issuecomment-840341390

The number of warnings increases as the number of components on the page increases...

avatar
May 21st 2021

This is quite annoying, please fix this ASAP 🙏.

image

avatar
May 23rd 2021

This is quite annoying, please fix this ASAP 🙏.

avatar
May 23rd 2021

Mark this as p4

avatar
May 24th 2021

This is quite annoying, please fix this ASAP 🙏.

avatar
May 24th 2021

Please fixed this problem, thank you!