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

About when to show suffix behavior #844

Open
1 of 6 tasks
raDiesle opened this issue Jun 4, 2024 · 0 comments
Open
1 of 6 tasks

About when to show suffix behavior #844

raDiesle opened this issue Jun 4, 2024 · 0 comments

Comments

@raDiesle
Copy link

raDiesle commented Jun 4, 2024

Describe the issue and the actual behavior

When migrating to v5 we realized serval changed behaviors, which made tests fail.
One of them is that in v4 it was showing suffix all the time, also when input has value of undefined or null.
With new version it shows only suffix if value is provided other than null/undefined, which basically means, when user starts typing.

We cannot set "0" to always show suffix, as the field is optional and may have null value or 0

I can workaround this by using placeholder={' %'}, but requires me to adjust test accessors.

Describe the expected behavior

Ideally we would like to be able to configure, when suffix is showing up. Best if field is focused or has a value other than null or undefined or "".
Otherwise show bps up all the time, like it was in v4

See e.g.
https://codesandbox.io/p/sandbox/suffice-demo-7tlerm?file=%2Fsrc%2Findex.js&from-embed=

Provide steps to reproduce this issue

1 . define suffix prop
2. set value to be null, undefined or ""
3. see that suffix does not appear, only if user starts typing a value

Please check the browsers where the issue is seen

  • Chrome
  • Chrome (Android)
  • Safari (OSX)
  • Safari (iOS)
  • Firefox
  • Firefox (Android)
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

No branches or pull requests

1 participant