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 Category scroll bar button #368

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

matbmapspeople
Copy link
Contributor

@matbmapspeople matbmapspeople commented Jun 5, 2024

What:

  • fixing scss for scroll buttons
  • fixing disabled state

How:

  • for the style I added space-between
  • for disabled state I found out that we are not reaching second else if . I studied a little those math operations and created one for else if . I just simply console logged all three: scrollWidth, scrollLeft and clientWidth.
  • I also used useEffect() for 'scroll' event.

Working solution:

Screen.Recording.2024-06-05.at.15.11.18.mov

@andreeaceachir142
Copy link
Contributor

@matbmapspeople Not sure what the changes in the Categories.jsx are for, the functionality works well when scrolling to the right, that the button becomes disabled. Test here: https://map.mapsindoors.com/

If we have less than 3 categories, the right button still appears to be clickable.
image

@matbmapspeople
Copy link
Contributor Author

I was sure I fixed it.. I will look into it more @andreeaceachir142

@matbmapspeople
Copy link
Contributor Author

Is it ready for re-test @andreeaceachir142, I also changed a little bit of code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants