@@ -13,9 +13,8 @@ import Modal from '@components/Modal';
13
13
import { PressableWithFeedback } from '@components/Pressable' ;
14
14
import type ChatListItem from '@components/SelectionList/ChatListItem' ;
15
15
import type ReportListItem from '@components/SelectionList/Search/ReportListItem' ;
16
- import type TaskListItem from '@components/SelectionList/Search/TaskListItem' ;
17
16
import type TransactionListItem from '@components/SelectionList/Search/TransactionListItem' ;
18
- import type { ExtendedTargetedEvent , ReportListItemType , SearchListItem } from '@components/SelectionList/types' ;
17
+ import type { ExtendedTargetedEvent , ReportActionListItemType , ReportListItemType , TransactionListItemType } from '@components/SelectionList/types' ;
19
18
import Text from '@components/Text' ;
20
19
import useArrowKeyFocusManager from '@hooks/useArrowKeyFocusManager' ;
21
20
import useKeyboardShortcut from '@hooks/useKeyboardShortcut' ;
@@ -32,7 +31,8 @@ import variables from '@styles/variables';
32
31
import CONST from '@src/CONST' ;
33
32
import ONYXKEYS from '@src/ONYXKEYS' ;
34
33
35
- type SearchListItemComponentType = typeof TransactionListItem | typeof ChatListItem | typeof ReportListItem | typeof TaskListItem ;
34
+ type SearchListItem = TransactionListItemType | ReportListItemType | ReportActionListItemType ;
35
+ type SearchListItemComponentType = typeof TransactionListItem | typeof ChatListItem | typeof ReportListItem ;
36
36
37
37
type SearchListHandle = {
38
38
scrollAndHighlightItem ?: ( items : string [ ] ) => void ;
@@ -340,27 +340,19 @@ function SearchList(
340
340
] ,
341
341
) ;
342
342
343
- const tableHeaderVisible = canSelectMultiple || ! ! SearchTableHeader ;
344
- const selectAllButtonVisible = canSelectMultiple && ! SearchTableHeader ;
345
-
346
343
return (
347
344
< View style = { [ styles . flex1 , ! isKeyboardShown && safeAreaPaddingBottomStyle , containerStyle ] } >
348
- { tableHeaderVisible && (
345
+ { canSelectMultiple && (
349
346
< View style = { [ styles . searchListHeaderContainerStyle , styles . listTableHeader ] } >
350
- { canSelectMultiple && (
351
- < Checkbox
352
- accessibilityLabel = { translate ( 'workspace.people.selectAll' ) }
353
- isChecked = { selectedItemsLength === flattenedTransactions . length }
354
- isIndeterminate = { selectedItemsLength > 0 && selectedItemsLength !== flattenedTransactions . length }
355
- onPress = { ( ) => {
356
- onAllCheckboxPress ( ) ;
357
- } }
358
- />
359
- ) }
360
-
361
- { SearchTableHeader }
362
-
363
- { selectAllButtonVisible && (
347
+ < Checkbox
348
+ accessibilityLabel = { translate ( 'workspace.people.selectAll' ) }
349
+ isChecked = { selectedItemsLength === flattenedTransactions . length }
350
+ isIndeterminate = { selectedItemsLength > 0 && selectedItemsLength !== flattenedTransactions . length }
351
+ onPress = { ( ) => {
352
+ onAllCheckboxPress ( ) ;
353
+ } }
354
+ />
355
+ { SearchTableHeader ?? (
364
356
< PressableWithFeedback
365
357
style = { [ styles . userSelectNone , styles . alignItemsCenter ] }
366
358
onPress = { onAllCheckboxPress }
@@ -374,7 +366,6 @@ function SearchList(
374
366
) }
375
367
</ View >
376
368
) }
377
-
378
369
< Animated . FlatList
379
370
data = { data }
380
371
renderItem = { renderItem }
0 commit comments