ant-design-vue icon indicating copy to clipboard operation
ant-design-vue copied to clipboard

Exception occurred in AutoComplete component nesting Input-Number

Open alandecastros opened this issue 2 years ago • 1 comments

  • [ ] I have searched the issues of this repository and believe that this is not a duplicate.

Version

3.2.20

Environment

"dependencies": { "vue": "^3.2.37", "ant-design-vue": "3.2.20" }, "devDependencies": { "@vitejs/plugin-vue": "^3.0.3", "vite": "^3.0.7" }

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Use as children of

<a-auto-complete
v-model:value="val"
:options="
Array.from({ length: 11 }, (_, i) => ({
value: i * 2   10,
label: `${i * 2   10}`,
}))
"
placeholder="type a number..."
>
<a-input-number />
</a-auto-complete>

What is expected?

It's expected to be able to input values others than it shows on autocomplete.

What is actually happening?

Doesn't allow you to change the value by typing.

Throwing the following exception:

Uncaught TypeError: Cannot read properties of undefined (reading 'value')
at onInputChange (index.js:137)
at onChange (SingleSelector.js:152)
at Proxy.onInput (Input.js:141)
at collectInputValue (InputNumber.js:325)
at onInternalInput (InputNumber.js:348)
at callWithErrorHandling (runtime-core.esm-bundler.js:173)
at callWithAsyncErrorHandling (runtime-core.esm-bundler.js:182)
at HTMLInputElement.invoker (runtime-dom.esm-bundler.js:345)

alandecastros avatar Jun 21 '23 20:06 alandecastros

Hello @alandecastros. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please send your Pull Request to proper branch, fill the Pull Request Template here, provide changelog/TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!

你好 @alandecastros,我们完全同意你的提议/反馈,欢迎直接在此仓库创建一个 Pull Request 来解决这个问题。请将 Pull Request 发到正确的分支,务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、TypeScript 定义、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。

github-actions[bot] avatar Jun 25 '23 02:06 github-actions[bot]