-
Notifications
You must be signed in to change notification settings - Fork 49
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
keyUp/keyDown event dispatch and textarea style support #4
base: master
Are you sure you want to change the base?
keyUp/keyDown event dispatch and textarea style support #4
Conversation
feat: support textAreaStyle
This pull request is automatically deployed with Now. Latest deployment for this branch: https://rc-mentions-git-fork-dbflower-feature-keyboard-events-dispatch.react-component.now.sh |
master 上的 test 一样跑不过去,吐血。 |
@zombieJ master上的ci一样跑不过去,而且本次提交不影响ci测试的部分 |
能举个例子什么情况需要这几个属性? |
keyUp/keyDown -> 监听回车发送。 |
拆成 2 个吧,先把 |
传递 |
|
我先提交一个新的commit把textAreaStyle拔掉咯? |
感觉需要包一下 |
关于 |
feat: use an object to wrap related states in keyUp/keyDown event handler
@zombieJ committed |
src/Mentions.tsx
Outdated
@@ -24,6 +24,15 @@ type BaseTextareaAttrs = Omit< | |||
|
|||
export type Placement = 'top' | 'bottom'; | |||
|
|||
export interface MentionKeyBoardEventPayload { | |||
measuring: MentionsState['measuring']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boolean
src/Mentions.tsx
Outdated
|
||
export type MentionKeyBoardEventHandler = ( | ||
event: React.KeyboardEvent<HTMLTextAreaElement>, | ||
payload?: MentionKeyBoardEventPayload, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
payload?
=> payload
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Omit 掉再自定义就行了。
还需要加对应的测试用例 |
|
feat: support textAreaStyle
feat: use an object to wrap related states in keyUp/keyDown event handler
…r/mentions into feature/keyboard-events-dispatch
feat: dispatch keyUp/keyDown event
feat: support textAreaStyle