diff --git a/components/Organizer/JudgingTab/Scoreboard.tsx b/components/Organizer/JudgingTab/Scoreboard.tsx index 64e99b6f..456c8b29 100644 --- a/components/Organizer/JudgingTab/Scoreboard.tsx +++ b/components/Organizer/JudgingTab/Scoreboard.tsx @@ -32,17 +32,6 @@ export default function Scoreboard(props: AllScoresProps) { setSearchText(''); }; - const handleSearch = ( - selectedKeys: string[], - confirm: (param?: FilterConfirmProps) => void, - dataIndex: string, - closeDropDown: boolean - ) => { - confirm({ closeDropdown: closeDropDown }); - setSearchText(selectedKeys[0]); - setSearchedColumn(dataIndex); - }; - const handleReset = (clearFilters: () => void) => { clearFilters(); setSearchText(''); @@ -67,9 +56,11 @@ export default function Scoreboard(props: AllScoresProps) { value={selectedKeys[0]} onChange={e => { setSelectedKeys(e.target.value ? [e.target.value] : []); - handleSearch(selectedKeys as string[], confirm, dataIndex, false); + confirm({ closeDropdown: false }); + setSearchText(e.target.value); + setSearchedColumn(dataIndex); }} - onPressEnter={() => handleSearch(selectedKeys as string[], confirm, dataIndex, true)} + onPressEnter={() => confirm({ closeDropdown: true })} style={{ marginBottom: 8, display: 'block' }} />