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

topItemCount zero value is ignored #1163

Open
maksimkoniukhau opened this issue Nov 23, 2024 · 1 comment
Open

topItemCount zero value is ignored #1163

maksimkoniukhau opened this issue Nov 23, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@maksimkoniukhau
Copy link

Describe the bug

TopItemCount '0' value is ignored.
I'm updating topItemCount property dynamically depends on some conditions. When I provide any positive number it is working as expected (top items displayed), however zero is ignored (top items stay on previous value).
I believe zero should be acceptable value in order to remove top items if they were displaying at start.

Reproduction

CodePen link for reproduction

To Reproduce

Steps to reproduce the behavior:

  1. Render component with topItemCount prop = 2.
  2. Change topItemCount value to 0
  3. topItemCount zero value is ignored

Expected behavior

When providing zero as a topItemCount value top items should disappear.

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome, Firefox
@maksimkoniukhau
Copy link
Author

maksimkoniukhau commented Nov 23, 2024

I added PR for this issue PR link
It would be good to have it. I really need it. Thanks.

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

No branches or pull requests

1 participant