Skip to content

pagination simple handleChange never trigger #1333

@roland-luo

Description

@roland-luo
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

1.4.2

Environment

chrome

Reproduction link

https://vue.ant.design/components/pagination-cn/#components-pagination-demo-simple-mode

Steps to reproduce

input an avaliable value like 4,press enter key, handleChange not trigger

What is expected?

normal usage

What is actually happening?

https://github.com/vueComponent/ant-design-vue/blob/master/components/vc-pagination/Pagination.jsx
orgin code:
handleKeyUp(event) {
const inputValue = event.target.value;
const stateCurrentInputValue = this.stateCurrentInputValue;
let value;

if (value !== stateCurrentInputValue) {
this.setState({
stateCurrentInputValue: value,
});
}

if (event.keyCode === KEYCODE.ENTER) {
this.handleChange(value);
} else if (event.keyCode === KEYCODE.ARROW_UP) {
this.handleChange(value - 1);
} else if (event.keyCode === KEYCODE.ARROW_DOWN) {
this.handleChange(value 1);
}
},
value is undefined, func handleChange never used

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