fix(native-select): add proper model-value binding in demo and calendar#1691
fix(native-select): add proper model-value binding in demo and calendar#1691zernonia merged 2 commits intounovue:devfrom
Conversation
…demo Replace `field` with `componentField` in NativeSelectFormDemo to ensure proper v-model binding. The NativeSelect component expects `modelValue` prop, but vee-validate's `field` object provides `value` instead
📝 WalkthroughWalkthroughA scoped slot variable in a Vue demo component is renamed from Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/v4/components/demo/NativeSelectFormDemo.vue (1)
34-34:⚠️ Potential issue | 🟡 Minor
his used but not imported.
his Vue's render/hyperscript function and requiresimport { h } from 'vue'in<script setup>. Without it, submitting the form will throw aReferenceErrorat runtime. The project has no auto-import configuration that would cover this.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/v4/components/demo/NativeSelectFormDemo.vue` at line 34, The template uses Vue's render function h in NativeSelectFormDemo.vue but h is not imported, causing a ReferenceError at runtime; fix by adding an explicit import for h from Vue in the <script setup> section (import { h } from 'vue') so the description line that calls h('pre', ... JSON.stringify(values...)) can resolve correctly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@apps/v4/components/demo/NativeSelectFormDemo.vue`:
- Line 34: The template uses Vue's render function h in NativeSelectFormDemo.vue
but h is not imported, causing a ReferenceError at runtime; fix by adding an
explicit import for h from Vue in the <script setup> section (import { h } from
'vue') so the description line that calls h('pre', ...
JSON.stringify(values...)) can resolve correctly.
❓ Type of change
📚 Description
The
NativeSelectcomponent expectsmodelValueprop but was not receiving it properly in two places:fieldprovidesvalue, notmodelValue. Changed to usecomponentFieldwhich provides the correct binding:model-valuebinding entirely. Added:model-value="date.month"and:model-value="date.year"📝 Checklist
Summary by CodeRabbit