Badge works wrong in dot mode #9359
Closed
Comments
Looked into it and found the lines, causing the errors: I'm going to fix it and create a PR as soon as i can :) |
fixed the count > 9 error and the count = 0 error, but i'm not sure if the intended behavior of the dot badge is to vanish if count = 0, since dot shouldn't be used simultaneously with count. |
Hello. Yes, from one side there is logic - badge control must be used only
in combination "dot=false + count" or "dot=true + status". And this is a
bit confusing that some parameters can be used only with condition of field
Dot.
In this case then usage of count (when dot=false) or count (when dot=true)
must be denied from code side. Or best solution would be provide 2 controls
- Status and Badge separately, since their parameters are so different.
What's your suggestion?
2018-02-15 13:53 GMT+02:00 Mathew <notifications@github.com>:
… fixed the count > 9 error and the count = 0 error, but i'm not sure if the
intended behavior of the dot badge is to vanish if count = 0, since dot
shouldn't be used simultaneously with count.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#9359 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMfdkaphTenS3D-i5BcE5XOOpBa-oKYJks5tVBrHgaJpZM4SFWOy>
.
|
iammathew
added a commit
to iammathew/ant-design
that referenced
this issue
Feb 15, 2018
Merged
created PR with new behavior, which shouldn't break any existing badges. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
3.2.1
Environment
Windows 10, Chrome 63.0.3239.132, React 16.2.0
Reproduction link
https://codesandbox.io/s/r0qp9o9rko
Steps to reproduce
See example
What is expected?
In DOT mode Dot must not be visible if count == 0 (of course with showZero == False).
When Dot has Count > 9 it starts to grow (horizontally). Since it does not show value it has not have to change its width.
What is actually happening?
Dot is visible also if showZero == False and count == 0
Dot size is changed if count has more than 1 digit
The text was updated successfully, but these errors were encountered: