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

Input缺少onPaste事件支持 #72

Closed
1 task done
vastwu opened this issue Dec 24, 2021 · 3 comments
Closed
1 task done

Input缺少onPaste事件支持 #72

vastwu opened this issue Dec 24, 2021 · 3 comments
Labels
invalid This doesn't seem right

Comments

@vastwu
Copy link

vastwu commented Dec 24, 2021

Describe Framework

  • tdesign-react

另外建议最好能暴露inputElementRef,以防有什么特殊的需求,例如这种onPaste事件,如果暴露了ref其实外不可以先自行实现一下
PS:主要诉求是pasteEvent的clipboardData

@chaishi
Copy link
Collaborator

chaishi commented Dec 24, 2021

@HQ-Lin 我们把关键元素的 Ref 都默认暴露一下吧

@honkinglin honkinglin added the in progress in progress label Dec 26, 2021
@honkinglin
Copy link
Collaborator

@HQ-Lin 我们把关键元素的 Ref 都默认暴露一下吧

我处理下

@honkinglin
Copy link
Collaborator

honkinglin commented Jan 5, 2022

目前 input 所有原生事件都是支持透传的,你可以直接传 onPaste={xx} 试试
https://codesandbox.io/s/tdesign-react-demo-forked-d1zof

具体逻辑参考:
https://github.com/Tencent/tdesign-react/blob/develop/src/input/Input.tsx#L81

@honkinglin honkinglin added the invalid This doesn't seem right label Jan 5, 2022
@honkinglin honkinglin removed the in progress in progress label Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants