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 readonly not working in button mode #3314

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

oljc
Copy link
Member

@oljc oljc commented Sep 26, 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

modebutton 时 设置 readOnly 左右按钮依然可以控制数值变化

Solution

参考 react 版设计只读禁用按钮效果修复
https://github.com/arco-design/arco-design/blob/5cff5d656de60d763d6b2d7317b8a2b217728d88/components/InputNumber/style/index.less#L158-L163

image

How is the change tested?

Changelog

Component Changelog(CN) Changelog(EN) Related issues
input-number 修复左右按钮模式下只读属性不生效问题 fix readonly not working in button mode Closes #3138

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

Copy link

codesandbox bot commented Sep 26, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@oljc oljc added the 🐛 Bug Something isn't working label Sep 26, 2024
@oljc oljc merged commit 3bbdab3 into arco-design:main Sep 26, 2024
2 of 4 checks passed
@oljc oljc deleted the fix-input-number branch September 26, 2024 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

a-input-number 设置mode为button且 readonly下, 仍然可以点击按钮变动数据
1 participant