Skip to content

Commit 90a0e23

Browse files
committed
Change transactionsVisibleLimit back to 20
1 parent 27eda78 commit 90a0e23

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/CONST/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,6 +1647,7 @@ const CONST = {
16471647
// we set this height threshold to 30dpi, since gesture bars will never be taller than that. (Samsung & Huawei: ~14-15dpi)
16481648
NAVIGATION_BAR_ANDROID_SOFT_KEYS_MINIMUM_HEIGHT_THRESHOLD: 30,
16491649
TRANSACTION: {
1650+
RESULTS_PAGE_SIZE: 20,
16501651
DEFAULT_MERCHANT: 'Expense',
16511652
UNKNOWN_MERCHANT: 'Unknown Merchant',
16521653
PARTIAL_TRANSACTION_MERCHANT: '(none)',

src/components/SelectionListWithSections/Search/TransactionGroupListExpanded.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ function TransactionGroupListExpanded<TItem extends ListItem>({
132132

133133
const onShowMoreButtonPress = useCallback(() => {
134134
if (isGroupByReports) {
135-
setTransactionsVisibleLimit((currentPageSize) => currentPageSize + CONST.SEARCH.RESULTS_PAGE_SIZE);
135+
setTransactionsVisibleLimit((currentPageSize) => currentPageSize + CONST.TRANSACTION.RESULTS_PAGE_SIZE);
136136
} else if (!isOffline && transactionsQueryJSON) {
137137
searchTransactions(CONST.SEARCH.RESULTS_PAGE_SIZE);
138138
}

src/components/SelectionListWithSections/Search/TransactionGroupListItem.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function TransactionGroupListItem<TItem extends ListItem>({
8686
const [transactionsSnapshot] = useOnyx(`${ONYXKEYS.COLLECTION.SNAPSHOT}${groupItem.transactionsQueryJSON?.hash}`, {canBeMissing: true});
8787

8888
const isGroupByReports = groupBy === CONST.SEARCH.GROUP_BY.REPORTS;
89-
const [transactionsVisibleLimit, setTransactionsVisibleLimit] = useState(CONST.SEARCH.RESULTS_PAGE_SIZE as number);
89+
const [transactionsVisibleLimit, setTransactionsVisibleLimit] = useState(CONST.TRANSACTION.RESULTS_PAGE_SIZE as number);
9090
const [isExpanded, setIsExpanded] = useState(false);
9191

9292
const transactions = useMemo(() => {
@@ -161,7 +161,7 @@ function TransactionGroupListItem<TItem extends ListItem>({
161161
const handleToggle = useCallback(() => {
162162
setIsExpanded(!isExpanded);
163163
if (isExpanded) {
164-
setTransactionsVisibleLimit(CONST.SEARCH.RESULTS_PAGE_SIZE);
164+
setTransactionsVisibleLimit(CONST.TRANSACTION.RESULTS_PAGE_SIZE);
165165
}
166166
}, [isExpanded]);
167167

0 commit comments

Comments
 (0)