Skip to content

Exception occurred in AutoComplete component nesting Input-Number #6685

Open
@alandecastros

Description

@alandecastros
  • 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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions