Can't use instance method as a v-for key when using v-memo #12013
Labels
🔨 p3-minor-bug
Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.
has workaround
A workaround has been found to avoid the problem
scope: compiler
Vue version
3.5.8
Link to minimal reproduction
https://play.vuejs.org/#eNqVVW1P2zAQ/iuWhQRIbSpgk6asrQYbH5gmNg2+LWgN8bUNJHZkO1lRlf++s50XB9pK5JPv/bnnzs6WXhZFUJVAQzpViUwLTRTosphHPM0LITW5jx8zIEspcnIcTKxkAo4/R3w6cSHojIKGvMhiDSgRMnVhExSmk85CR1SrRPBlugqelOBYdWu8I5qIvEgzkD8LnQquIhoSazG2OMvEv+9Wp2UJo1afrCF53qF/Uhuji+gvCQpkBRHtbDqWK9DOfH13Cxs8d8ZcsDJD7wPG36BEVhqMzu2q5Axhe34W7Y3lLuWre3W90cBV25QBajxr6x9RZPLrgdZ7uBfBBxsX8RpZ7MbQzw2Zho2dGINlXGbaZeFxDgaojWhgFlIUylbpodipn5wOdCzWsVUZMBIdJG+hEaJNwm/oEZI/rY70ZvOlLCRnDTHu69CA0uSsY819GWgN0pgvI9obHJY96c/3pz/fm/5qkL49PnTezhMZ8hqzoEbD4Ad3qPEqtDBz0GvBVNgATdYxX8EPm+/E0DlqkresogvOXOAwM7E6WRxtjVNg+qjHjeACajIjR9vmvDhtoz0PdHAHC6fnDRfIA/D+wovTJmG3A571ba0b9t46KdtXI2Vt/nb37Utz4NmxW2mPRlhDzBrBiLI7W+P8FlHg67R+pXZs7TDcQQaJJjvsKLTJjb4vO9WPgr34GEg1Xgo5i6jpkIhlf5EiSsJneEGTRyMqq3EOuXBqf5IRHeBj8+3W0WbYJXWNSPruO49XSXb7+fdmqlzbJiuCcHNHWCnzpS9u1VG1Y+ePoAKuA/eaBVWclTBEb+sI+wB2/DRbjQw199HwY2P9uqFDBwbM4DLM2uuAhbDtRm26dXWGPU5cGp8Gn5XhfLuR4rnZt+FP7m+FcLEGvs4XwcfgE63/A0QlRvw=
Steps to reproduce
In the SFC change the value of any of the dropdowns.
What is expected?
It should change the value of the dropdown.
What is actually happening?
It's crashing.
System Info
Any additional comments?
When compiling, the v-memo cache key comparison should use $options instead of the data parameter.
You can sidestep the issue by adding
this
to the:key
property. Like:key=this.getId(data)
.The text was updated successfully, but these errors were encountered: