Skip to content

Commit

Permalink
Fix receipt header missing after merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Kicu committed May 29, 2024
1 parent 7660bd9 commit 2fd1c57
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/components/SelectionList/SearchTableHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ type SearchColumnConfig = {
};

const SearchColumns: SearchColumnConfig[] = [
{
columnName: CONST.SEARCH_TABLE_COLUMNS.RECEIPT,
translationKey: 'common.receipt',
shouldShow: () => true,
isSortable: false,
},
{
columnName: CONST.SEARCH_TABLE_COLUMNS.DATE,
translationKey: 'common.date',
Expand Down Expand Up @@ -94,24 +100,18 @@ function SearchTableHeader({data, sortBy, sortOrder, onSortPress}: SearchTableHe
return;
}

// Todo add textStyle
// <SearchTableHeaderColumn
// containerStyle={[StyleUtils.getSearchTableColumnStyles(CONST.SEARCH_TABLE_COLUMNS.RECEIPT)]}
// textStyle={StyleUtils.getTextOverflowStyle('clip')}
// text={translate('common.receipt')}
// />

return (
<View style={[styles.ph5, styles.pb3]}>
<View style={[styles.flex1, styles.flexRow, styles.gap3, styles.ph4]}>

{SearchColumns.map(({columnName, translationKey, shouldShow, isSortable}) => {
const isActive = sortBy === columnName;
const textStyle = columnName === CONST.SEARCH_TABLE_COLUMNS.RECEIPT ? StyleUtils.getTextOverflowStyle('clip') : null;

return (
<SortableHeaderText
key={translationKey}
text={translate(translationKey)}
textStyle={textStyle}
sortOrder={sortOrder ?? CONST.SORT_ORDER.ASC}
isActive={isActive}
containerStyle={[StyleUtils.getSearchTableColumnStyles(columnName)]}
Expand Down
1 change: 0 additions & 1 deletion src/libs/SearchUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import type {RootStackParamList, State} from './Navigation/types';
import * as TransactionUtils from './TransactionUtils';
import * as UserUtils from './UserUtils';

// Todo use Valueof
type SortOrder = ValueOf<typeof CONST.SORT_ORDER>;
type SearchColumnType = ValueOf<typeof CONST.SEARCH_TABLE_COLUMNS>;

Expand Down

0 comments on commit 2fd1c57

Please sign in to comment.