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(inputNumber): fix size of inputNumber behaves differently when si… #36922

Closed

Conversation

gp0119
Copy link

@gp0119 gp0119 commented Aug 6, 2022

…ze is set by configProvider

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

https://codesandbox.io/s/zu-jian-chi-cun-antd-4-22-3-forked-yb7pi6?file=/demo.js

💡 Background and solution

ConfigProvider 提供了size属性时,InputNumber的大小表现跟没有提供size的时候表现不一样,
打开上面的链接可以发现, 当ConfigProvider 提供了size属性时,InputNumbersmall的时候会多了ant-input-number-affix-wrapper-sm属性,导致左右padding跟没有提供的时候不同,InputNumberlarge的时候会多了ant-input-number-affix-wrapper-lg属性,导致高度不同

📝 Changelog

Language Changelog
🇺🇸 English fix size of inputNumber behaves differently when size is set by configProvider
🇨🇳 Chinese 当configProvider提供了size时候,修复InputNumber的大小表现不一样的问题

☑️ Self-Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@github-actions
Copy link
Contributor

github-actions bot commented Aug 6, 2022

Prepare preview

@codecov
Copy link

codecov bot commented Aug 8, 2022

Codecov Report

Merging #36922 (0d907e6) into master (20a2bb3) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master    #36922   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          437       437           
  Lines         8035      8035           
  Branches      2420      2420           
=========================================
  Hits          8035      8035           
Impacted Files Coverage Δ
components/input-number/index.tsx 100.00% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@afc163
Copy link
Member

afc163 commented Aug 17, 2022

rebase master

kungege and others added 25 commits August 17, 2022 13:43
…reEvent (ant-design#36921)

Co-authored-by: ian.xufeng <ian.xufeng@shopee.com>
…t-design#36929)

* fix(docs):fix useFormItemStatus description code

* fix():修复CR意见
…n#36953)

* AutoComplete(test): refactor custom input autocomplete with userEvent and screen

* AutoComplete(test): refactor dataSource is object array with screen and userEvent

* AutoComplete(test): update file name to tsx and refactor with screen

* AutoComplete(test): option test refactor

* AutoComplete(test): className test refactor

* remove fireEvent

* ignore ts error

* disable no-console

Co-authored-by: ian.xufeng <ian.xufeng@shopee.com>
* fix: sync flush

* test: test case

* test: fix deps
Co-authored-by: hydraZty <hydra_zty@163.com>
* refactor: rewrite header by FunctionComponent

* refactor: rewrite footer by FunctionComponent

* fix: strong type

* refactor: rewrite IconDisplay & PicSearcher & Category by FunctionComponent

* style: formatting

* pref: add useCallback/useMemo

* refactor: use typescript refactor javascript

* fix: remove string

* fix: fix eslint

* test: migrate part of Descriptions tests

* test: migrate part of Descriptions tests

* test: migrate part of Descriptions tests
dependabot bot and others added 18 commits August 17, 2022 13:43
…ant-design#37022)

Bumps [stylelint-config-standard](https://github.com/stylelint/stylelint-config-standard) from 26.0.0 to 27.0.0.
- [Release notes](https://github.com/stylelint/stylelint-config-standard/releases)
- [Changelog](https://github.com/stylelint/stylelint-config-standard/blob/main/CHANGELOG.md)
- [Commits](stylelint/stylelint-config-standard@26.0.0...27.0.0)

---
updated-dependencies:
- dependency-name: stylelint-config-standard
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* test: replace test case with test lib

* test: Update test case to make more sense

* chore: trigger ci

* test: rm firstChild

Co-authored-by: 二货机器人 <smith3816@gmail.com>
* test: migrate part of TimePicker tests

* test: test clearIcon

* test: migrate part of TimePicker tests

Co-authored-by: 二货机器人 <smith3816@gmail.com>
* temp

* fix: mock esmodule default for Dropdown

* test: move test cases to testing-library for DropDown

* chore: remove console

* fix: snapshot test

* refactor: jest mock improvement
* chore: release script includes current info

* chore: more issue
* test: move test cases to testing-library for Grid

* fix: test when typeof gutter is object array in large screen
* docs: update 4.0 sketch file link

* docs: add dark theme sketh
* fix: Drawer add motion deadline

* test: Update snapshot

* test: ignore motion in snapshot render
* docs: 4.22.6

* chore: changelog version

* chore: update
)

* UIEN-1399 - Accordions are missing expand and collapse states

* update tests

* updated snapshots
* test: add table multi-sort case

* chore: code clean
@github-actions
Copy link
Contributor

Hi @gp0119. Thanks for your contribution. The path .github/ or scripts/ and CHANGELOG is only maintained by team members. This current PR will be closed and team members will help on this.

@gp0119
Copy link
Author

gp0119 commented Aug 17, 2022

重新提交了一个 #37112

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.