Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions src/CONST/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8069,6 +8069,8 @@ const CONST = {
MONEY_REQUEST_REPORT_ACTIONS_LIST_SELECT_ALL: 'MoneyRequestReportActionsList-SelectAll',
MONEY_REQUEST_REPORT_TRANSACTION_ITEM: 'MoneyRequestReportTransactionItem',
REPORT_ACTION_AVATAR: 'Report-ReportActionAvatar',
PARTICIPANTS_ROW: 'Report-ParticipantsRow',
ROOM_MEMBERS_ROW: 'Report-RoomMembersRow',
},
SIDEBAR: {
SIGN_IN_BUTTON: 'Sidebar-SignInButton',
Expand Down Expand Up @@ -8418,6 +8420,9 @@ const CONST = {
MORE_DROPDOWN: 'WorkspaceTags-MoreDropdown',
BULK_ACTIONS_DROPDOWN: 'WorkspaceTags-BulkActionsDropdown',
},
REPORT_FIELDS: {
LIST_VALUE_ROW: 'WorkspaceReportFields-ListValueRow',
},
TAXES: {
ROW: 'WorkspaceTaxes-Row',
ADD_BUTTON: 'WorkspaceTaxes-AddButton',
Expand Down
65 changes: 0 additions & 65 deletions src/components/SelectionListWithModal/CustomListHeader.tsx

This file was deleted.

This file was deleted.

128 changes: 0 additions & 128 deletions src/components/SelectionListWithModal/index.tsx

This file was deleted.

7 changes: 6 additions & 1 deletion src/components/Table/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import CONST from '@src/CONST';

import type {FlashListRef} from '@shopify/flash-list';

import React, {useImperativeHandle, useRef} from 'react';
import React, {useEffect, useImperativeHandle, useRef} from 'react';

import type {TableContextValue} from './TableContext';
import type {TableData, TableHandle, TableMethods, TableProps} from './types';
Expand Down Expand Up @@ -162,6 +162,7 @@ function Table<DataType extends TableData, ColumnKey extends string = string, Fi
selectionEnabled,
shouldEnableSelectionInNarrowPaneModal,
onRowSelectionChange,
onSearchStringChange,
...listProps
}: TableProps<DataType, ColumnKey, FilterKey>) {
const {translate} = useLocalize();
Expand All @@ -182,6 +183,10 @@ function Table<DataType extends TableData, ColumnKey extends string = string, Fi
const {middleware: searchMiddleware, activeSearchString, methods: searchMethods, hasActiveSearchString} = useSearching<DataType>({isItemInSearch});
const searchedData = searchMiddleware(filteredData);

useEffect(() => {
onSearchStringChange?.(activeSearchString);
}, [activeSearchString, onSearchStringChange]);

const {
activeSorting,
methods: sortMethods,
Expand Down
3 changes: 3 additions & 0 deletions src/components/Table/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ type TableProps<DataType extends TableData, ColumnKey extends string = string, F

/** Callback when an option is selected */
onRowSelectionChange?: (selectedRowKeys: string[]) => void;

/** Optional callback fired when the active search string changes. */
onSearchStringChange?: (searchString: string) => void;
}>;

export type {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export default function ReportParticipantsTableRow({item, rowIndex, shouldUseNar
rowIndex={rowIndex}
disabled={item.disabled}
accessibilityLabel={accessibilityLabel}
sentryLabel={CONST.SENTRY_LABEL.REPORT.PARTICIPANTS_ROW}
offlineWithFeedback={{pendingAction: item.pendingAction}}
onPress={item.action}
>
Expand Down
12 changes: 2 additions & 10 deletions src/components/Tables/ReportParticipantsTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import type * as OnyxCommon from '@src/types/onyx/OnyxCommon';
import type {ListRenderItemInfo} from '@shopify/flash-list';

import React from 'react';
import {View} from 'react-native';

import ReportParticipantsTableRow from './ReportParticipantsTableRow';

Expand Down Expand Up @@ -127,16 +126,9 @@ export default function ReportParticipantsTable({ref, members, isGroupChat, sele
keyExtractor={(item) => item.keyForList}
onRowSelectionChange={onRowSelectionChange}
>
{shouldShowSearchBar && (
<View style={[styles.mb3, styles.mh5]}>
<Table.SearchBar
label={translate('selectionList.findMember')}
style={[styles.mb0, styles.mh0]}
/>
</View>
)}
{shouldShowSearchBar && <Table.SearchBar label={translate('selectionList.findMember')} />}
<Table.Header />
<Table.Body />
<Table.Body contentContainerStyle={styles.flexGrow1} />
</Table>
);
}
Expand Down
Loading
Loading