Skip to content

Commit

Permalink
add keyboard access to slider component
Browse files Browse the repository at this point in the history
  • Loading branch information
shinyichen committed May 7, 2024
1 parent c2a4fc8 commit 4ec6ebd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/Slider/Slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ export const Slider = ({
rootStyle={{
position: 'relative',
}}
onUpdate={handleUpdateValues}
onSlideEnd={handleChangeValues}
onChange={handleChangeValues} // value when mouse drag stopped, or keyboard update value
onUpdate={handleUpdateValues} // this updates values when mouse dragging, used by histogram
>
<Rail>
{({ getRailProps }) => (
Expand Down Expand Up @@ -217,6 +217,7 @@ const Handle = ({ handle, getHandleProps, align, mt, showLabel }: IHandleProps):
color="gray.900"
borderColor="blue.600"
borderWidth={1}
tabIndex={0}
{...getHandleProps(handle.id)}
/>
{showLabel && (
Expand Down

0 comments on commit 4ec6ebd

Please sign in to comment.