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

add onKeyDown Props that supports prevent default behavior #138

Merged
merged 14 commits into from
Dec 21, 2020

Conversation

conquera99
Copy link
Contributor

@conquera99 conquera99 commented Sep 5, 2020

fix ant-design/ant-design#26279
fix #40

changes:

  1. add onKeyDown props to add keydown functionality in Picker component
  2. onKeyDown support preventDefault in second args to prevent default behavior
  3. add example in example/basic.tsx
  4. add documentation on README.md

@vercel
Copy link

vercel bot commented Sep 5, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/react-component/picker/3l02bvuep
✅ Preview: https://picker-git-feature-onkeydown.react-component.vercel.app

@codecov
Copy link

codecov bot commented Sep 5, 2020

Codecov Report

Merging #138 (c490761) into master (bf3ef16) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #138   +/-   ##
=======================================
  Coverage   99.60%   99.60%           
=======================================
  Files          45       45           
  Lines        2033     2044   +11     
  Branches      600      601    +1     
=======================================
+ Hits         2025     2036   +11     
  Misses          6        6           
  Partials        2        2           
Impacted Files Coverage Δ
src/Picker.tsx 100.00% <100.00%> (ø)
src/RangePicker.tsx 100.00% <100.00%> (ø)
src/hooks/usePickerInput.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bf3ef16...c490761. Read the comment docs.

README.md Outdated Show resolved Hide resolved
pull from master repository 09/09/2020
update readme
update basic example
fix preventDefaultBehaviors types
@mgcrea
Copy link

mgcrea commented Sep 21, 2020

Would really like to see this merge, it would definitely help to setup alternative picker behaviors.

@Abdurahmanov
Copy link

Please tell me when this pull request will be merged?

@kerm1it
Copy link
Member

kerm1it commented Dec 17, 2020

@conquera99 can you resolve conflicts?

@conquera99
Copy link
Contributor Author

@conquera99 can you resolve conflicts?

okay, i will try to resolve the conflicts tonight

README.md Outdated Show resolved Hide resolved
src/Picker.tsx Outdated Show resolved Hide resolved
src/RangePicker.tsx Outdated Show resolved Hide resolved
update examples
add test case for prevent default
apply @kerm1it suggestions
@conquera99
Copy link
Contributor Author

just applied your suggestions, please review it again

thank you @kerm1it

README.md Outdated Show resolved Hide resolved
src/Picker.tsx Outdated Show resolved Hide resolved
src/RangePicker.tsx Outdated Show resolved Hide resolved
rename all preventDefaultBehaviors to preventDefault
apply @kerm1it suggestions
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
examples/basic.tsx Outdated Show resolved Hide resolved
@kerm1it kerm1it changed the title Add feature onKeyDown props and disableKey props add onKeyDown Props that supports prevent default behavior Dec 18, 2020
Copy link
Member

@kerm1it kerm1it left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kerm1it
Copy link
Member

kerm1it commented Dec 18, 2020

@afc163 这个我看没有问题了,可以合了。

@afc163

This comment has been minimized.

@kerm1it
Copy link
Member

kerm1it commented Dec 21, 2020

- disableKey
+ keyboard

哪里还有呢?没找到😂

@afc163
Copy link
Member

afc163 commented Dec 21, 2020

没注意看 diff,我看标题和描述里还有。

@kerm1it
Copy link
Member

kerm1it commented Dec 21, 2020

没注意看 diff,我看标题和描述里还有。

代码里面应该没有了,描述里面确实还有,还没有改。

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

Successfully merging this pull request may close these issues.

DatePicker Component Custom Keydown [OnKeydown props] Add onKeyDown event
5 participants