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

Sender onChange 访问事件对象能力扩展 #338

Open
defaultjacky opened this issue Dec 11, 2024 · 4 comments
Open

Sender onChange 访问事件对象能力扩展 #338

defaultjacky opened this issue Dec 11, 2024 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@defaultjacky
Copy link

需求动机

目前 Sender onChange 只能访问到输入框对应 string value
onChange?: (value: string) => void
期望可以访问完整的事件对象

提议的 API 是什么样的?

onChangeEvent?: (e:React.ChangeEvent | React.ChangeEvent
) => void;

@YumoImer
Copy link
Collaborator

感谢反馈~我觉得可以的,参考 antd 已有的 API 规范即可。

@YumoImer YumoImer added the help wanted Extra attention is needed label Dec 11, 2024
@LofiSu
Copy link

LofiSu commented Dec 13, 2024

目前 Sender onChange 只能访问到输入框对应 string value
onChange?: (value: string) => void
期望可以访问完整的事件对象

interface SenderProps {
value?: string;
onChange?: (event: React.ChangeEvent) => void; // 接收完整事件
// 其他 props
}
这个我可以去改一下hh

@defaultjacky
Copy link
Author

defaultjacky commented Dec 16, 2024

PR: #362 @YumoImer

@defaultjacky
Copy link
Author

At least 1 approving review is required by reviewers with write access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants