Skip to content

feat: InputNumber support addon - #31432

Merged
afc163 merged 4 commits into
ant-design:featurefrom
Austaras:feature
Aug 31, 2021
Merged

afc163 merged 4 commits into
ant-design:featurefrom
Austaras:feature

Conversation

@Austaras

@Austaras Austaras commented Jul 16, 2021 •

Copy link
Copy Markdown
Contributor

🤔 This is a ...

  • New feature

I have no actual idea how to implement suffix icon and there's no reference, so maybe later

🔗 Related issue link

partially fix #14284

📝 Changelog

Language Changelog
🇺🇸 English add addonBefore and addonAfter to InputNumber
🇨🇳 Chinese InputNumber 增加 addonBefore 和 addonAfter 属性支持

☑️ 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

github-actions Bot commented Jul 16, 2021 •

Copy link
Copy Markdown
Contributor

@Austaras
Austaras marked this pull request as draft July 16, 2021 10:33
@codecov

codecov Bot commented Jul 19, 2021 •

Copy link
Copy Markdown

Codecov Report

Merging #31432 (251fba1) into feature (47f2bd4) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 251fba1 differs from pull request most recent head ccd8cbe. Consider uploading reports for the commit ccd8cbe to get more accurate results
Impacted file tree graph

@@           Coverage Diff            @@
##           feature   #31432   +/-   ##
========================================
  Coverage    99.96%   99.96%           
========================================
  Files          409      409           
  Lines         7615     7626   +11     
  Branches      2084     2089    +5     
========================================
+ Hits          7612     7623   +11     
  Misses           3        3           
Impacted Files Coverage Δ
components/input-number/index.tsx 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 47f2bd4...ccd8cbe. Read the comment docs.

@Austaras
Austaras marked this pull request as ready for review July 21, 2021 10:53
@Austaras

Copy link
Copy Markdown
Contributor Author

@afc163 could you take some time review this?

@Austaras Austaras changed the title InputNumber support addon and prefix InputNumber support addon Jul 22, 2021
@Austaras

Copy link
Copy Markdown
Contributor Author

updated for ci

@Austaras

Copy link
Copy Markdown
Contributor Author

The failed test is also failed in original repo's feature branch

@FreeFrags

Copy link
Copy Markdown

Was going to make an issue for this too! Thank you for adding this feature, lets hope it gets merged soon!

@simonelnahas

Copy link
Copy Markdown

Thanks for putting in the work @Austaras ! Glad to see someone finally fixing this.

Thank you for creating the AddonBefore/AddonAfter.

From what i can see you are still missing to replicate the prefix and postfix behaviour.
Like this:
image

@Austaras

Copy link
Copy Markdown
Contributor Author

@simonelnahas I'd like to, but there's neither reference implementation nor prototype for input number with pre/postfix, and I have no idea how to deal with the position of arrows of input number and prefix, so I'll leave it to others.

@simonelnahas

Copy link
Copy Markdown

Okay as long as we keep the issue open then. Then this PR will not close #14284

@Austaras

Copy link
Copy Markdown
Contributor Author

I have rebased on feature and all tests seem to pass, @afc163 can we get this merged?

@Austaras Austaras changed the title InputNumber support addon feat: InputNumber support addon Aug 17, 2021
@mlshvdv

mlshvdv commented Aug 23, 2021

Copy link
Copy Markdown

Need this feature! Looks nice!

@afc163

afc163 commented Aug 27, 2021

Copy link
Copy Markdown
Member

/rebase

Comment thread components/input-number/index.zh-CN.md Resolved
@afc163

afc163 commented Aug 27, 2021

Copy link
Copy Markdown
Member
  1. 可以把 prefix 也加上。
  2. suffix 有位置冲突,暂时不加。

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.

5 participants