Skip to content

Commit

Permalink
fix(input): on-keyup prop type, closes tusen-ai#5101
Browse files Browse the repository at this point in the history
  • Loading branch information
jizai1125 committed Jul 31, 2023
1 parent 437ce23 commit eea56e2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
- Fix `n-tree`'s `TreeOption`'s `checkboxDisabled` prop doesn't work when `check-on-click` is `true`.
- Fix rapid clicks on `n-date-input`'s buttons triggering a text select for the rest of the website.
- Fix `n-auto-complete`'s autocomplete menu's unexpected open when clicking the clear icon with the input not focused, closes [#4658](https://github.com/tusen-ai/naive-ui/issues/4658).
- Fix `n-input`'s `on-keyup` prop type, closes [#5101](https://github.com/tusen-ai/naive-ui/issues/5101)

### Features

Expand Down Expand Up @@ -237,7 +238,6 @@

## 2.33.3


### Feats

- `n-dialog` adds `onAfterLeave` in DialogOptions Properties, closes [#3662](https://github.com/tusen-ai/naive-ui/issues/3662).
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
- 修复 `n-tree` `check-on-click``true` 时,`TreeOption` `checkboxDisabled` 不生效
- 修复 `n-date-input` 的按钮快速点击时网站其余文本会被选中
- 修复 `n-auto-complete` 在未聚焦状态下点击清除按钮时补全菜单意外打开的问题,关闭 [#4658](https://github.com/tusen-ai/naive-ui/issues/4658)
- 修复 `n-input` 属性 `on-keyup` 类型,关闭 [#5101](https://github.com/tusen-ai/naive-ui/issues/5101)

### Features

Expand Down Expand Up @@ -238,7 +239,6 @@

## 2.33.3


### Feats

- `n-dialog` 新增 `onAfterLeave` 在 DialogOptions Properties 中,关闭 [#3662](https://github.com/tusen-ai/naive-ui/issues/3662)
Expand Down
3 changes: 2 additions & 1 deletion src/input/src/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export const inputProps = {
renderCount: Function as PropType<(props: { value: string }) => VNodeChild>,
onMousedown: Function as PropType<(e: MouseEvent) => void>,
onKeydown: Function as PropType<(e: KeyboardEvent) => void>,
onKeyup: Function as PropType<(e: KeyboardEvent) => void>,
onKeyup: [Function, Array] as PropType<(e: KeyboardEvent) => void>,
onInput: [Function, Array] as PropType<OnUpdateValue>,
onFocus: [Function, Array] as PropType<MaybeArray<(e: FocusEvent) => void>>,
onBlur: [Function, Array] as PropType<MaybeArray<(e: FocusEvent) => void>>,
Expand Down Expand Up @@ -174,6 +174,7 @@ export default defineComponent({
name: 'Input',
props: inputProps,
setup (props) {
console.log(props)
if (__DEV__) {
watchEffect(() => {
if (props.showPasswordToggle) {
Expand Down

0 comments on commit eea56e2

Please sign in to comment.