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

<Select/>的属性onPopupScrolltarget存在异常 #48990

Closed
Brucia323 opened this issue May 20, 2024 · 3 comments · Fixed by #49020
Closed

<Select/>的属性onPopupScrolltarget存在异常 #48990

Brucia323 opened this issue May 20, 2024 · 3 comments · Fixed by #49020

Comments

@Brucia323
Copy link
Contributor

Brucia323 commented May 20, 2024

Reproduction link

Edit on CodeSandbox

Steps to reproduce

打开选择器并滚动

What is expected?

target能打印出scrollTop、scrollHeight等内容,编写代码时类型也包含scrollTop、scrollHeight等。

What is actually happening?

target打印出的是元素,类型也没有scrollTop、scrollHeight等。

Environment Info
antd 5.17.0
React 18.2.0
System macOS 14.5 (23F79)
Browser Edge 125.0.2535.51
@wanpan11
Copy link
Contributor

你需要访问回调参数对象里面的 target

image

image

@afc163
Copy link
Member

afc163 commented May 22, 2024

onPopupScroll={(e) => {
  console.log(e.target.scrollHeight);
}}

@afc163 afc163 closed this as completed May 22, 2024
@Brucia323
Copy link
Contributor Author

但是没有类型

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants