-
Notifications
You must be signed in to change notification settings - Fork 7
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 scroll buttons disabled/enabled states in the Kiosk mode #386
Conversation
packages/components/src/components/scroll-buttons/scroll-buttons.tsx
Outdated
Show resolved
Hide resolved
There's still some naming referring to locations and categories in the scroll buttons web component. |
How about now @ammapspeople |
packages/components/src/components/scroll-buttons/scroll-buttons.tsx
Outdated
Show resolved
Hide resolved
packages/components/src/components/scroll-buttons/scroll-buttons.tsx
Outdated
Show resolved
Hide resolved
New changes pushed @ammapspeople |
packages/components/src/components/scroll-buttons/scroll-buttons.tsx
Outdated
Show resolved
Hide resolved
packages/components/src/components/scroll-buttons/scroll-buttons.tsx
Outdated
Show resolved
Hide resolved
I cleaned up a little bit now and we do not use additional property. We also do not check for length. @ammapspeople |
What do you think about it now @ammapspeople ☝️ |
packages/components/src/components/scroll-buttons/scroll-buttons.tsx
Outdated
Show resolved
Hide resolved
Much better 👏 |
I updated
updateScrollButtonsState()
function so it gets a proper disabled state when locations' length is lower than 8. Number 8 indicates maximum number of locations that are visible in the element without scroll.Inside
Search.jsx
, I called newly created functionnewCategorySelected()
. When new category is selected, and all locations to that category are rendered, we need to update disabled/enabled state of scroll buttons.I performed a lot of scouting.