Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CP stg] Report Participant Page - remove debounce to allow member search #51702

Merged
merged 2 commits into from
Oct 30, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
remove debounce and just rely on normal state management
  • Loading branch information
bondydaa committed Oct 29, 2024
commit 02ba35fc23d4f81f611f77fa8a220f19a8d0c0ad
14 changes: 1 addition & 13 deletions src/pages/ReportParticipantsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import TableListItem from '@components/SelectionList/TableListItem';
import type {ListItem, SelectionListHandle} from '@components/SelectionList/types';
import SelectionListWithModal from '@components/SelectionListWithModal';
import Text from '@components/Text';
import useDebouncedState from '@hooks/useDebouncedState';
import useLocalize from '@hooks/useLocalize';
import useMobileSelectionMode from '@hooks/useMobileSelectionMode';
import useNetwork from '@hooks/useNetwork';
Expand Down Expand Up @@ -67,18 +66,7 @@ function ReportParticipantsPage({report, route}: ReportParticipantsPageProps) {
const isFocused = useIsFocused();
const {isOffline} = useNetwork();
const canSelectMultiple = isGroupChat && isCurrentUserAdmin && (isSmallScreenWidth ? selectionMode?.isEnabled : true);
const [searchValue, debouncedSearchValue, setSearchValue] = useDebouncedState('');

useEffect(
() => () => {
UserSearchPhraseActions.clearUserSearchPhrase();
},
[],
);

useEffect(() => {
UserSearchPhraseActions.updateUserSearchPhrase(debouncedSearchValue);
}, [debouncedSearchValue]);
const [searchValue, setSearchValue] = useState('');

useEffect(() => {
if (isFocused) {
Expand Down
Loading