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

fix(input-number): fix change event triggering mechanism #2915

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

oljc
Copy link
Member

@oljc oljc commented Jan 11, 2024

Types of changes

  • New feature
  • Bug fix
  • Enhancement
  • Component style change
  • Typescript definition change
  • Documentation change
  • Coding style change
  • Refactoring
  • Test cases
  • Continuous integration
  • Breaking change
  • Others

Background and context

数字输入框change事件触发逻辑修复
#2904

最小复现(不聚集输入框直接点击清空按钮):https://codesandbox.io/p/sandbox/frosty-wing-nhcm6s

Solution

  1. handleChange 增加对input change事件类型的区分 如果是Clear就不执行。
  2. 修复 modelEvent 为input 时 值变化 change 事件没触发问题

How is the change tested?

Changelog

Component Changelog(CN) Changelog(EN) Related issues
input-number 修复 change 事件触发逻辑 Fix change event triggering mechanism #2904

Checklist:

  • Test suite passes (npm run test)
  • Provide changelog for relevant changes (e.g. bug fixes and new features) if applicable.
  • Changes are submitted to the appropriate branch (e.g. features should be submitted to feature branch and others
    should be submitted to main branch)

Other information

@flsion flsion added the type: 🐞 bug Something isn't working label Feb 2, 2024
@flsion flsion self-assigned this Feb 2, 2024
@flsion flsion merged commit 19ac1b3 into arco-design:main Feb 2, 2024
2 of 4 checks passed
@flsion flsion added this to the 2.54.4 milestone Feb 2, 2024
@Zhangliang5111
Copy link

can't get value when you use keyboard

@lanseria
Copy link
Contributor

@LIjiAngChen8
https://stackblitz.com/edit/xvabfn?file=src%2FApp.vue
使用键盘时无法获取值

@oljc
Copy link
Member Author

oljc commented Feb 20, 2024

@LIjiAngChen8 https://stackblitz.com/edit/xvabfn?file=src%2FApp.vue 使用键盘时无法获取值

@lanseria @Zhangliang5111 失去焦点或者回车没有更新值,已经在 #2961 修复这个问题了。

@starzeng
Copy link

添加上 model-event="input" 可以解决更新值问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: 🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants