fix(InputMenu): sync search term with input value#6494
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughonInputUpdate now always assigns the incoming value into searchTerm. In the single-input rendering branch, Component.Input receives :model-value set to searchTerm only when mode is autocomplete. Tests import nextTick and add a case that mounts InputMenu in autocomplete mode, clears searchTerm to '', awaits re-render, and asserts the rendered input's value is ''. Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
src/runtime/components/InputMenu.vueParsing error: Unexpected token ) test/components/InputMenu.spec.tsParsing error: Unexpected token { 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 |
24f40ef to
abdf9cb
Compare
commit: |
🔗 Linked issue
Resolves #6473
❓ Type of change
📚 Description
This keeps the
InputMenuinput bound to itssearchTermmodel in the single-value path, matching the existing multiple-value path. When a parent clearssearchTerm, the rendered input value now clears as well instead of keeping stale text.I also added a regression test for externally clearing
searchTerm.📝 Checklist
Validation:
node node_modules\eslint\bin\eslint.js src/runtime/components/InputMenu.vue test/components/InputMenu.spec.tsnode node_modules\vue-tsc\bin\vue-tsc.js --noEmit