From 46031b76c0e85e761861530eb68079a7a0fcc4d0 Mon Sep 17 00:00:00 2001 From: Augustin Husson Date: Tue, 8 Feb 2022 09:55:12 +0100 Subject: [PATCH] persis the search event Signed-off-by: Augustin Husson --- pkg/ui/react-app/src/components/SearchBar.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/ui/react-app/src/components/SearchBar.tsx b/pkg/ui/react-app/src/components/SearchBar.tsx index 761b290684..3b9a10bd88 100644 --- a/pkg/ui/react-app/src/components/SearchBar.tsx +++ b/pkg/ui/react-app/src/components/SearchBar.tsx @@ -13,6 +13,9 @@ const SearchBar: FC = ({ handleChange, placeholder }) => { const handleSearchChange = (e: ChangeEvent) => { clearTimeout(filterTimeout); + // TODO e.persist() should be removed once the upgrade to react v17 is done. + // https://reactjs.org/docs/legacy-event-pooling.html + e.persist(); filterTimeout = setTimeout(() => { handleChange(e); }, 300);