Skip to content

Commit

Permalink
BASIRA #257 - Removing reset button from FacetSlider
Browse files Browse the repository at this point in the history
  • Loading branch information
dleadbetter committed Nov 29, 2024
1 parent 6d77eac commit a660200
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 29 deletions.
6 changes: 0 additions & 6 deletions packages/semantic-ui/src/components/FacetSlider.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,4 @@

.facet-slider .ui.input {
width: 65px;
}

.facet-slider .buttons {
display: flex;
justify-content: flex-end;
margin-top: 1em;
}
24 changes: 1 addition & 23 deletions packages/semantic-ui/src/components/FacetSlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import React, {
useEffect,
useState
} from 'react';
import { Button, Grid, Input } from 'semantic-ui-react';
import { Grid, Input } from 'semantic-ui-react';
import Facet, { type Props as FacetProps } from './Facet';
import { type RangeSliderProps } from '../types/InstantSearch';
import './FacetSlider.css';
Expand Down Expand Up @@ -65,16 +65,6 @@ const FacetSlider = forwardRef(({ useRangeSlider, ...props }: Props, ref: HTMLEl
setTimer(() => refine(newValue));
}, [getInputValue, refine]);

/**
* Resets the slider min/max values to the default range.
*
* @type {(function(): void)|*}
*/
const onReset = useCallback(() => {
setValue([min, max]);
refine([min, max]);
}, [max, min, refine]);

/**
* Sets the view value when to/from change.
*/
Expand Down Expand Up @@ -132,18 +122,6 @@ const FacetSlider = forwardRef(({ useRangeSlider, ...props }: Props, ref: HTMLEl
)}
</Grid.Column>
</Grid>
{ props.editable && (
<div
className='buttons'
>
<Button
color='red'
icon='repeat'
onClick={onReset}
size='small'
/>
</div>
)}
</div>
</Facet>
);
Expand Down

0 comments on commit a660200

Please sign in to comment.