Skip to content

Commit

Permalink
fix: 요금 차트 수정
Browse files Browse the repository at this point in the history
- 초기화, 저장 후에 차트에 바로 적용되도록 수정

#45
  • Loading branch information
sally4405 committed Jun 5, 2020
1 parent 222e359 commit bccd541
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/src/components/SearchForm/FormPrice.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ const FormPrice = () => {
}));

const [priceRange, setPriceRange] = useState([minPrice, maxPrice]);
const [leftDimWidth, setLeftDimWidth] = useState(0);
const [rightDimWidth, setRightDimWidth] = useState(0);
const [leftDimWidth, setLeftDimWidth] = useState(minPrice / 5);
const [rightDimWidth, setRightDimWidth] = useState((500-maxPrice) / 5);

const handleChange = (event, newPriceRange) => {
setPriceRange(newPriceRange);
Expand All @@ -104,6 +104,8 @@ const FormPrice = () => {

const onReset = () => {
setPriceRange([0, 500]);
setLeftDimWidth(0);
setRightDimWidth(0);
dispatch(reset());
};

Expand Down

0 comments on commit bccd541

Please sign in to comment.