Vue version
3.5.39
Link to minimal reproduction
https://play.vuejs.org/#__PROD__eNp9Uk1P4zAQ/SuWLwWJTQ/dPSwK1X6Iw+4BEHDDCAV3UgyObdnjtFKU/86MQwtIwMWK57158+bFg/wdQtVnkMeyTjqagCIB5rBUznTBRxSDiNCKUbTRd2JG1JlyymnvElMtaISVOGHSwc3tIWNtdhqNdyJtDOqHa38FeHAoBuXEvqPqG5uB+hxsBOM3s9b7GQuMytXzyQu5oAtCF2yDQDch6vuMSNq/tDX66UTJN0OUXE43gZ5F6/lELjLUOg0X/bfOr8By74sbJUWXLZpgpyHE9aGsUGwSk8yROp31fEI+4d03kXh0vuPRPmXSzkiIsByG3fRxrOdc4b33u8ojiYlSbs26ekze0Q8qASqpfReMhXhe9JOSx1O0jDXW+s3/UsOY4WhX1w+gnz6oP6Yt15S8iJAg9qDkHsMmrjlThk+vzmBL33uQEsyW2F+Al5C8zexxov3JbkW23/CK23/lmRm3vk6nWwSXdkuxUWaOha8kPb2/X6z+andRfS999JQoxbseImtSgIvqR7X4Kcdnt8MAPA==
Steps to reproduce
- Bind a
<select multiple v-model> to an Array.
- Switch the bound value to a Set at runtime.
- Interact with the select again.
- The emitted model becomes an Array again.
- Switching back from Set -> Array shows the same stale-type behavior in reverse.
What is expected?
The current collection type should be respected after the model switches at runtime.
What is actually happening?
The change handler keeps using the collection type captured when the directive was created, so the first user interaction after a runtime Array/Set switch emits the old type.
System Info
Any additional comments?
No response
Vue version
3.5.39
Link to minimal reproduction
https://play.vuejs.org/#__PROD__eNp9Uk1P4zAQ/SuWLwWJTQ/dPSwK1X6Iw+4BEHDDCAV3UgyObdnjtFKU/86MQwtIwMWK57158+bFg/wdQtVnkMeyTjqagCIB5rBUznTBRxSDiNCKUbTRd2JG1JlyymnvElMtaISVOGHSwc3tIWNtdhqNdyJtDOqHa38FeHAoBuXEvqPqG5uB+hxsBOM3s9b7GQuMytXzyQu5oAtCF2yDQDch6vuMSNq/tDX66UTJN0OUXE43gZ5F6/lELjLUOg0X/bfOr8By74sbJUWXLZpgpyHE9aGsUGwSk8yROp31fEI+4d03kXh0vuPRPmXSzkiIsByG3fRxrOdc4b33u8ojiYlSbs26ekze0Q8qASqpfReMhXhe9JOSx1O0jDXW+s3/UsOY4WhX1w+gnz6oP6Yt15S8iJAg9qDkHsMmrjlThk+vzmBL33uQEsyW2F+Al5C8zexxov3JbkW23/CK23/lmRm3vk6nWwSXdkuxUWaOha8kPb2/X6z+andRfS999JQoxbseImtSgIvqR7X4Kcdnt8MAPA==
Steps to reproduce
<select multiple v-model>to an Array.What is expected?
The current collection type should be respected after the model switches at runtime.
What is actually happening?
The change handler keeps using the collection type captured when the directive was created, so the first user interaction after a runtime Array/Set switch emits the old type.
System Info
Any additional comments?
No response