Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onShowSizeChange方法调用后还会调用onPageChange #324

Open
lynshir opened this issue Mar 3, 2021 · 0 comments
Open

onShowSizeChange方法调用后还会调用onPageChange #324

lynshir opened this issue Mar 3, 2021 · 0 comments

Comments

@lynshir
Copy link

lynshir commented Mar 3, 2021

期望给onShowSizeChange增加返回值,通过返回值判断是否要继续执行onPageChange,现在只要传了onShowSizeChange,就会调用onPageChange,是否可以这样,比如

_this.changePageSize = function (size) {
   /*... 原来的逻辑 ... */
 //在这里增加个判断,可以让用户选择是否继续调用onChange,也可以用户手动调用
      const noChangePage = _this.props.onShowSizeChange(current, size);
      if (noChangePage === 'reject') return
      if ('onChange' in _this.props && _this.props.onChange) {
        _this.props.onChange(current, size);
      }
    };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant