bug: The 'Clear' button triggers a data refetch even though no filters are selected.
Closed this issue · 3 comments
iZooGooD commented
Describe the bug
- On the /hotels route, clicking the 'Clear Filters' button triggers an API call even when no filters are applied.
To Reproduce
Steps to reproduce the behavior:
- Go to /hotels route
- Dont apply any filters and click on 'clear' button from left (Vertical filters sections)
- It causes data re-fetch
Expected behavior
- Should not trigger refetch when there are no active filters.
Additional context
- The issue needs to be addressed in the
onClearFiltersAction
function located insrc\routes\listings\HotelsSearch.jsx
ketansahugit commented
Hey, I'd like to work on this issue. I will start working on this right away.
ketansahugit commented
@iZooGooD I have linked a PR.
iZooGooD commented
@iZooGooD I have linked a PR.
Thanks @ketansahugit, merged.