pagination
pagination copied to clipboard
当跳转页输入框失去焦点后会重置到首页
由于commit203修改造成跳转输入框失去焦点被重置到第一页 在Options中有对空字符串转化为0操作
getValidValue() {
const { goInputText, current } = this.state;
return isNaN(goInputText) ? current : Number(goInputText);
}
handleBlur = () => {
const { goButton, quickGo } = this.props;
if (goButton) {
return;
}
quickGo(this.getValidValue());
}
go = (e) => {
const { goInputText } = this.state;
if (goInputText === '') {
return;
}
if (e.keyCode === KEYCODE.ENTER || e.type === 'click') {
this.setState({
goInputText: '',
});
this.props.quickGo(this.getValidValue());
}
}