-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create amount filter #47343
Create amount filter #47343
Changes from 6 commits
449f22a
afa7e1c
4885ee5
1ca1423
3ceeb4a
e231cc8
8cdfe96
d568ed6
7adcd4b
eed752a
a7cbfe5
070731e
52ab72e
c205d92
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,61 @@ | ||||||
import React, {useCallback, useMemo} from 'react'; | ||||||
import useLocalize from '@hooks/useLocalize'; | ||||||
import {replaceAllDigits, stripSpacesFromAmount, validateAmount} from '@libs/MoneyRequestUtils'; | ||||||
import {replaceCommaWithDot} from '@libs/SearchUtils'; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
import CONST from '@src/CONST'; | ||||||
import TextInput from './TextInput'; | ||||||
import type {BaseTextInputProps} from './TextInput/BaseTextInput/types'; | ||||||
|
||||||
type AmountFormProps = { | ||||||
/** Amount supplied by the FormProvider */ | ||||||
value?: string; | ||||||
|
||||||
/** Callback to update the amount in the FormProvider */ | ||||||
onInputChange?: (value: string) => void; | ||||||
} & Partial<BaseTextInputProps>; | ||||||
|
||||||
function AmountWithoutCurrencyForm({value: amount, onInputChange, inputID, name, defaultValue, accessibilityLabel, role, label, ...rest}: AmountFormProps) { | ||||||
const {toLocaleDigit} = useLocalize(); | ||||||
|
||||||
const currentAmount = useMemo(() => (typeof amount === 'string' ? amount : ''), [amount]); | ||||||
|
||||||
/** | ||||||
* Sets the selection and the amount accordingly to the value passed to the input | ||||||
* @param newAmount - Changed amount from user input | ||||||
*/ | ||||||
const setNewAmount = useCallback( | ||||||
(newAmount: string) => { | ||||||
// Remove spaces from the newAmount value because Safari on iOS adds spaces when pasting a copied value | ||||||
// More info: https://github.com/Expensify/App/issues/16974 | ||||||
const newAmountWithoutSpaces = stripSpacesFromAmount(newAmount); | ||||||
const replacedCommasAmount = replaceCommaWithDot(newAmountWithoutSpaces); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
if (!validateAmount(replacedCommasAmount, 3)) { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We support up to 2 digits
Suggested change
|
||||||
return; | ||||||
} | ||||||
onInputChange?.(replacedCommasAmount); | ||||||
}, | ||||||
[onInputChange], | ||||||
); | ||||||
|
||||||
const formattedAmount = replaceAllDigits(currentAmount, toLocaleDigit); | ||||||
|
||||||
return ( | ||||||
<TextInput | ||||||
value={formattedAmount} | ||||||
onChangeText={setNewAmount} | ||||||
inputID={inputID} | ||||||
name={name} | ||||||
label={label} | ||||||
defaultValue={defaultValue} | ||||||
accessibilityLabel={accessibilityLabel} | ||||||
role={role} | ||||||
keyboardType={CONST.KEYBOARD_TYPE.DECIMAL_PAD} | ||||||
// eslint-disable-next-line react/jsx-props-no-spreading | ||||||
{...rest} | ||||||
/> | ||||||
); | ||||||
} | ||||||
|
||||||
AmountWithoutCurrencyForm.displayName = 'AmountWithoutCurrencyForm'; | ||||||
|
||||||
export default AmountWithoutCurrencyForm; |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -74,6 +74,10 @@ function getTransactionItemCommonFormattedProperties( | |||||||||||||||||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
function replaceCommaWithDot(amount: string): string { | ||||||||||||||||||||||||||||||||||||||||||
return amount.replace(/,/g, '.'); | ||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's reuse MoneyRequestUtils.replaceCmmasWithPeriod
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||
function isSearchDataType(type: string): type is SearchDataTypes { | ||||||||||||||||||||||||||||||||||||||||||
const searchDataTypes: string[] = Object.values(CONST.SEARCH.DATA_TYPES); | ||||||||||||||||||||||||||||||||||||||||||
return searchDataTypes.includes(type); | ||||||||||||||||||||||||||||||||||||||||||
|
@@ -427,6 +431,28 @@ function buildDateFilterQuery(filterValues: Partial<SearchAdvancedFiltersForm>) | |||||||||||||||||||||||||||||||||||||||||
return dateFilter; | ||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
/** | ||||||||||||||||||||||||||||||||||||||||||
* @private | ||||||||||||||||||||||||||||||||||||||||||
* returns Date filter query string part, which needs special logic | ||||||||||||||||||||||||||||||||||||||||||
*/ | ||||||||||||||||||||||||||||||||||||||||||
function buildAmountFilterQuery(filterValues: Partial<SearchAdvancedFiltersForm>) { | ||||||||||||||||||||||||||||||||||||||||||
const lessThan = filterValues[FILTER_KEYS.LESS_THAN]; | ||||||||||||||||||||||||||||||||||||||||||
const greaterThan = filterValues[FILTER_KEYS.GREATER_THAN]; | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
let amountFilter = ''; | ||||||||||||||||||||||||||||||||||||||||||
if (lessThan) { | ||||||||||||||||||||||||||||||||||||||||||
amountFilter += `${CONST.SEARCH.SYNTAX_FILTER_KEYS.AMOUNT}<${lessThan}`; | ||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||
if (lessThan && greaterThan) { | ||||||||||||||||||||||||||||||||||||||||||
amountFilter += ' '; | ||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||
if (greaterThan) { | ||||||||||||||||||||||||||||||||||||||||||
amountFilter += `${CONST.SEARCH.SYNTAX_FILTER_KEYS.AMOUNT}>${greaterThan}`; | ||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit pick, let's invert the order so we show it always as
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
return amountFilter; | ||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
function sanitizeString(str: string) { | ||||||||||||||||||||||||||||||||||||||||||
if (str.includes(' ') || str.includes(',')) { | ||||||||||||||||||||||||||||||||||||||||||
return `"${str}"`; | ||||||||||||||||||||||||||||||||||||||||||
|
@@ -450,40 +476,41 @@ function getExpenseTypeTranslationKey(expenseType: ValueOf<typeof CONST.SEARCH.T | |||||||||||||||||||||||||||||||||||||||||
* Given object with chosen search filters builds correct query string from them | ||||||||||||||||||||||||||||||||||||||||||
*/ | ||||||||||||||||||||||||||||||||||||||||||
function buildQueryStringFromFilters(filterValues: Partial<SearchAdvancedFiltersForm>) { | ||||||||||||||||||||||||||||||||||||||||||
const filtersString = Object.entries(filterValues) | ||||||||||||||||||||||||||||||||||||||||||
.map(([filterKey, filterValue]) => { | ||||||||||||||||||||||||||||||||||||||||||
if ((filterKey === FILTER_KEYS.MERCHANT || filterKey === FILTER_KEYS.DESCRIPTION || filterKey === FILTER_KEYS.REPORT_ID || filterKey === FILTER_KEYS.KEYWORD) && filterValue) { | ||||||||||||||||||||||||||||||||||||||||||
const keyInCorrectForm = (Object.keys(CONST.SEARCH.SYNTAX_FILTER_KEYS) as KeysOfFilterKeysObject[]).find((key) => CONST.SEARCH.SYNTAX_FILTER_KEYS[key] === filterKey); | ||||||||||||||||||||||||||||||||||||||||||
if (keyInCorrectForm) { | ||||||||||||||||||||||||||||||||||||||||||
return `${CONST.SEARCH.SYNTAX_FILTER_KEYS[keyInCorrectForm]}:${filterValue as string}`; | ||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||
const filtersString = Object.entries(filterValues).map(([filterKey, filterValue]) => { | ||||||||||||||||||||||||||||||||||||||||||
if ((filterKey === FILTER_KEYS.MERCHANT || filterKey === FILTER_KEYS.DESCRIPTION || filterKey === FILTER_KEYS.REPORT_ID || filterKey === FILTER_KEYS.KEYWORD) && filterValue) { | ||||||||||||||||||||||||||||||||||||||||||
const keyInCorrectForm = (Object.keys(CONST.SEARCH.SYNTAX_FILTER_KEYS) as KeysOfFilterKeysObject[]).find((key) => CONST.SEARCH.SYNTAX_FILTER_KEYS[key] === filterKey); | ||||||||||||||||||||||||||||||||||||||||||
if (keyInCorrectForm) { | ||||||||||||||||||||||||||||||||||||||||||
return `${CONST.SEARCH.SYNTAX_FILTER_KEYS[keyInCorrectForm]}:${filterValue as string}`; | ||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
if ( | ||||||||||||||||||||||||||||||||||||||||||
(filterKey === FILTER_KEYS.CATEGORY || | ||||||||||||||||||||||||||||||||||||||||||
filterKey === FILTER_KEYS.CARD_ID || | ||||||||||||||||||||||||||||||||||||||||||
filterKey === FILTER_KEYS.TAX_RATE || | ||||||||||||||||||||||||||||||||||||||||||
filterKey === FILTER_KEYS.EXPENSE_TYPE || | ||||||||||||||||||||||||||||||||||||||||||
filterKey === FILTER_KEYS.TAG || | ||||||||||||||||||||||||||||||||||||||||||
filterKey === FILTER_KEYS.CURRENCY) && | ||||||||||||||||||||||||||||||||||||||||||
Array.isArray(filterValue) && | ||||||||||||||||||||||||||||||||||||||||||
filterValue.length > 0 | ||||||||||||||||||||||||||||||||||||||||||
) { | ||||||||||||||||||||||||||||||||||||||||||
const filterValueArray = filterValues[filterKey] ?? []; | ||||||||||||||||||||||||||||||||||||||||||
const keyInCorrectForm = (Object.keys(CONST.SEARCH.SYNTAX_FILTER_KEYS) as KeysOfFilterKeysObject[]).find((key) => CONST.SEARCH.SYNTAX_FILTER_KEYS[key] === filterKey); | ||||||||||||||||||||||||||||||||||||||||||
if (keyInCorrectForm) { | ||||||||||||||||||||||||||||||||||||||||||
return `${CONST.SEARCH.SYNTAX_FILTER_KEYS[keyInCorrectForm]}:${filterValueArray.map(sanitizeString).join(',')}`; | ||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||
if ( | ||||||||||||||||||||||||||||||||||||||||||
(filterKey === FILTER_KEYS.CATEGORY || | ||||||||||||||||||||||||||||||||||||||||||
filterKey === FILTER_KEYS.CARD_ID || | ||||||||||||||||||||||||||||||||||||||||||
filterKey === FILTER_KEYS.TAX_RATE || | ||||||||||||||||||||||||||||||||||||||||||
filterKey === FILTER_KEYS.EXPENSE_TYPE || | ||||||||||||||||||||||||||||||||||||||||||
filterKey === FILTER_KEYS.TAG || | ||||||||||||||||||||||||||||||||||||||||||
filterKey === FILTER_KEYS.CURRENCY) && | ||||||||||||||||||||||||||||||||||||||||||
Array.isArray(filterValue) && | ||||||||||||||||||||||||||||||||||||||||||
filterValue.length > 0 | ||||||||||||||||||||||||||||||||||||||||||
) { | ||||||||||||||||||||||||||||||||||||||||||
const filterValueArray = filterValues[filterKey] ?? []; | ||||||||||||||||||||||||||||||||||||||||||
const keyInCorrectForm = (Object.keys(CONST.SEARCH.SYNTAX_FILTER_KEYS) as KeysOfFilterKeysObject[]).find((key) => CONST.SEARCH.SYNTAX_FILTER_KEYS[key] === filterKey); | ||||||||||||||||||||||||||||||||||||||||||
if (keyInCorrectForm) { | ||||||||||||||||||||||||||||||||||||||||||
return `${CONST.SEARCH.SYNTAX_FILTER_KEYS[keyInCorrectForm]}:${filterValueArray.map(sanitizeString).join(',')}`; | ||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
return undefined; | ||||||||||||||||||||||||||||||||||||||||||
}) | ||||||||||||||||||||||||||||||||||||||||||
.filter(Boolean) | ||||||||||||||||||||||||||||||||||||||||||
.join(' '); | ||||||||||||||||||||||||||||||||||||||||||
return undefined; | ||||||||||||||||||||||||||||||||||||||||||
}); | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
const dateFilter = buildDateFilterQuery(filterValues); | ||||||||||||||||||||||||||||||||||||||||||
filtersString.push(dateFilter); | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
const amountFilter = buildAmountFilterQuery(filterValues); | ||||||||||||||||||||||||||||||||||||||||||
filtersString.push(amountFilter); | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
return dateFilter ? `${filtersString} ${dateFilter}` : filtersString; | ||||||||||||||||||||||||||||||||||||||||||
return filtersString.filter(Boolean).join(' '); | ||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
function getFilters(queryJSON: SearchQueryJSON) { | ||||||||||||||||||||||||||||||||||||||||||
|
@@ -574,4 +601,5 @@ export { | |||||||||||||||||||||||||||||||||||||||||
normalizeQuery, | ||||||||||||||||||||||||||||||||||||||||||
shouldShowYear, | ||||||||||||||||||||||||||||||||||||||||||
getExpenseTypeTranslationKey, | ||||||||||||||||||||||||||||||||||||||||||
replaceCommaWithDot, | ||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||
}; |
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -39,6 +39,19 @@ function getFilterDisplayTitle(filters: Partial<SearchAdvancedFiltersForm>, fiel | |||||||
return dateValue; | ||||||||
} | ||||||||
|
||||||||
if (fieldName === CONST.SEARCH.SYNTAX_FILTER_KEYS.AMOUNT) { | ||||||||
const {lessThan, greaterThan} = filters; | ||||||||
if (lessThan && greaterThan) { | ||||||||
return translate('search.filters.amount.between', greaterThan, lessThan); | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
} | ||||||||
if (lessThan) { | ||||||||
return translate('search.filters.amount.lessThan', lessThan); | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
} | ||||||||
if (greaterThan) { | ||||||||
return translate('search.filters.amount.greaterThan', greaterThan); | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
} | ||||||||
} | ||||||||
|
||||||||
if ( | ||||||||
(fieldName === CONST.SEARCH.SYNTAX_FILTER_KEYS.CATEGORY || fieldName === CONST.SEARCH.SYNTAX_FILTER_KEYS.CURRENCY || fieldName === CONST.SEARCH.SYNTAX_FILTER_KEYS.TAG) && | ||||||||
filters[fieldName] | ||||||||
|
@@ -132,6 +145,11 @@ function AdvancedSearchFilters() { | |||||||
description: 'common.reportID' as const, | ||||||||
route: ROUTES.SEARCH_ADVANCED_FILTERS_REPORT_ID, | ||||||||
}, | ||||||||
{ | ||||||||
title: getFilterDisplayTitle(searchAdvancedFilters, CONST.SEARCH.SYNTAX_FILTER_KEYS.AMOUNT, translate), | ||||||||
description: 'common.total' as const, | ||||||||
route: ROUTES.SEARCH_ADVANCED_FILTERS_AMOUNT, | ||||||||
}, | ||||||||
{ | ||||||||
title: getFilterDisplayTitle(searchAdvancedFilters, CONST.SEARCH.SYNTAX_FILTER_KEYS.CATEGORY, translate), | ||||||||
description: 'common.category' as const, | ||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,84 @@ | ||||||||||||||
import React from 'react'; | ||||||||||||||
import {View} from 'react-native'; | ||||||||||||||
import {useOnyx} from 'react-native-onyx'; | ||||||||||||||
import AmountWithoutCurrencyForm from '@components/AmountWithoutCurrencyForm'; | ||||||||||||||
import FormProvider from '@components/Form/FormProvider'; | ||||||||||||||
import InputWrapper from '@components/Form/InputWrapper'; | ||||||||||||||
import type {FormOnyxValues} from '@components/Form/types'; | ||||||||||||||
import HeaderWithBackButton from '@components/HeaderWithBackButton'; | ||||||||||||||
import ScreenWrapper from '@components/ScreenWrapper'; | ||||||||||||||
import useAutoFocusInput from '@hooks/useAutoFocusInput'; | ||||||||||||||
import useLocalize from '@hooks/useLocalize'; | ||||||||||||||
import useThemeStyles from '@hooks/useThemeStyles'; | ||||||||||||||
import {updateAdvancedFilters} from '@libs/actions/Search'; | ||||||||||||||
import Navigation from '@libs/Navigation/Navigation'; | ||||||||||||||
import CONST from '@src/CONST'; | ||||||||||||||
import ONYXKEYS from '@src/ONYXKEYS'; | ||||||||||||||
import ROUTES from '@src/ROUTES'; | ||||||||||||||
import INPUT_IDS from '@src/types/form/SearchAdvancedFiltersForm'; | ||||||||||||||
|
||||||||||||||
function SearchFiltersAmountPage() { | ||||||||||||||
const styles = useThemeStyles(); | ||||||||||||||
const {translate} = useLocalize(); | ||||||||||||||
|
||||||||||||||
const [searchAdvancedFiltersForm] = useOnyx(ONYXKEYS.FORMS.SEARCH_ADVANCED_FILTERS_FORM); | ||||||||||||||
const greaterThan = searchAdvancedFiltersForm?.[INPUT_IDS.GREATER_THAN]; | ||||||||||||||
This comment was marked as resolved.
Sorry, something went wrong. |
||||||||||||||
const lessThan = searchAdvancedFiltersForm?.[INPUT_IDS.LESS_THAN]; | ||||||||||||||
This comment was marked as resolved.
Sorry, something went wrong. |
||||||||||||||
const {inputCallbackRef} = useAutoFocusInput(); | ||||||||||||||
|
||||||||||||||
const updateAmountFilter = (values: FormOnyxValues<typeof ONYXKEYS.FORMS.SEARCH_ADVANCED_FILTERS_FORM>) => { | ||||||||||||||
updateAdvancedFilters(values); | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
Navigation.goBack(ROUTES.SEARCH_ADVANCED_FILTERS); | ||||||||||||||
}; | ||||||||||||||
|
||||||||||||||
return ( | ||||||||||||||
<ScreenWrapper | ||||||||||||||
testID={SearchFiltersAmountPage.displayName} | ||||||||||||||
shouldShowOfflineIndicatorInWideScreen | ||||||||||||||
offlineIndicatorStyle={styles.mtAuto} | ||||||||||||||
includeSafeAreaPaddingBottom={false} | ||||||||||||||
> | ||||||||||||||
<HeaderWithBackButton | ||||||||||||||
title={translate('common.total')} | ||||||||||||||
onBackButtonPress={() => { | ||||||||||||||
Navigation.goBack(ROUTES.SEARCH_ADVANCED_FILTERS); | ||||||||||||||
}} | ||||||||||||||
/> | ||||||||||||||
<FormProvider | ||||||||||||||
style={[styles.flex1, styles.ph5]} | ||||||||||||||
formID={ONYXKEYS.FORMS.SEARCH_ADVANCED_FILTERS_FORM} | ||||||||||||||
onSubmit={updateAmountFilter} | ||||||||||||||
submitButtonText={translate('common.save')} | ||||||||||||||
enabledWhenOffline | ||||||||||||||
> | ||||||||||||||
<View style={styles.mb5}> | ||||||||||||||
<InputWrapper | ||||||||||||||
InputComponent={AmountWithoutCurrencyForm} | ||||||||||||||
inputID={INPUT_IDS.GREATER_THAN} | ||||||||||||||
name={INPUT_IDS.GREATER_THAN} | ||||||||||||||
defaultValue={greaterThan} | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
label={translate('search.filters.amount.greaterThan')} | ||||||||||||||
accessibilityLabel={translate('search.filters.amount.greaterThan')} | ||||||||||||||
role={CONST.ROLE.PRESENTATION} | ||||||||||||||
/> | ||||||||||||||
</View> | ||||||||||||||
<View style={styles.mb5}> | ||||||||||||||
<InputWrapper | ||||||||||||||
InputComponent={AmountWithoutCurrencyForm} | ||||||||||||||
inputID={INPUT_IDS.LESS_THAN} | ||||||||||||||
name={INPUT_IDS.LESS_THAN} | ||||||||||||||
defaultValue={lessThan} | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
label={translate('search.filters.amount.lessThan')} | ||||||||||||||
accessibilityLabel={translate('search.filters.amount.lessThan')} | ||||||||||||||
role={CONST.ROLE.PRESENTATION} | ||||||||||||||
ref={inputCallbackRef} | ||||||||||||||
/> | ||||||||||||||
</View> | ||||||||||||||
</FormProvider> | ||||||||||||||
</ScreenWrapper> | ||||||||||||||
); | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
SearchFiltersAmountPage.displayName = 'SearchFiltersAmountPage'; | ||||||||||||||
|
||||||||||||||
export default SearchFiltersAmountPage; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.