Skip to content

Commit 0bb5d17

Browse files
committed
fix(#2472): trim whitespace from search input
1 parent 5334b8a commit 0bb5d17

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ changes.
1818
### Fixed
1919

2020
- Fix searching by full DRep IDs on wrong prefix cut [Issue 2639](https://github.com/IntersectMBO/govtool/issues/2639)
21+
- Trim whitespace from search bar input [Issue 2472](https://github.com/IntersectMBO/govtool/issues/2472)
2122

2223
### Changed
2324

govtool/frontend/src/context/dataActionsBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ interface ProviderProps {
4444
const DataActionsBarProvider: FC<ProviderProps> = ({ children }) => {
4545
const isAdjusting = useRef<boolean>(false);
4646
const [searchText, setSearchText] = useState<string>("");
47-
const debouncedSearchText = useDebounce(searchText, 300);
47+
const debouncedSearchText = useDebounce(searchText.trim(), 300);
4848
const [filtersOpen, setFiltersOpen] = useState<boolean>(false);
4949
const [chosenFilters, setChosenFilters] = useState<string[]>([]);
5050
const [sortOpen, setSortOpen] = useState<boolean>(false);

0 commit comments

Comments
 (0)