diff --git a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js index cc8ec394872c..0d80cbeccbb3 100755 --- a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js +++ b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js @@ -17,6 +17,7 @@ import personalDetailsPropType from '../../../personalDetailsPropType'; import reportPropTypes from '../../../reportPropTypes'; import refPropTypes from '../../../../components/refPropTypes'; import * as Report from '../../../../libs/actions/Report'; +import useNetwork from '../../../../hooks/useNetwork'; const propTypes = { /** Beta features list */ @@ -98,6 +99,7 @@ function MoneyRequestParticipantsSelector({ personalDetails: [], userToInvite: null, }); + const {isOffline} = useNetwork(); const maxParticipantsReached = participants.length === CONST.REPORT.MAXIMUM_PARTICIPANTS; @@ -284,6 +286,7 @@ function MoneyRequestParticipantsSelector({ confirmButtonText={translate('iou.addToSplit')} onConfirmSelection={navigateToSplit} textInputLabel={translate('optionsSelector.nameEmailOrPhoneNumber')} + textInputAlert={isOffline ? `${translate('common.youAppearToBeOffline')} ${translate('search.resultsAreLimited')}` : ''} safeAreaPaddingBottomStyle={safeAreaPaddingBottomStyle} shouldShowOptions={isOptionsDataReady} shouldPreventDefaultFocusOnSelectRow={!Browser.isMobile()} diff --git a/src/pages/tasks/TaskShareDestinationSelectorModal.js b/src/pages/tasks/TaskShareDestinationSelectorModal.js index 9e130418bb9c..e65d22d6145d 100644 --- a/src/pages/tasks/TaskShareDestinationSelectorModal.js +++ b/src/pages/tasks/TaskShareDestinationSelectorModal.js @@ -20,6 +20,7 @@ import * as Task from '../../libs/actions/Task'; import * as ReportUtils from '../../libs/ReportUtils'; import ROUTES from '../../ROUTES'; import * as Report from '../../libs/actions/Report'; +import useNetwork from '../../hooks/useNetwork'; const propTypes = { /* Onyx Props */ @@ -52,6 +53,7 @@ function TaskShareDestinationSelectorModal(props) { const [filteredRecentReports, setFilteredRecentReports] = useState([]); const {isSearchingForReports} = props; const optionRef = useRef(); + const {isOffline} = useNetwork(); const filteredReports = useMemo(() => { const reports = {}; @@ -146,6 +148,7 @@ function TaskShareDestinationSelectorModal(props) { showTitleTooltip shouldShowOptions={didScreenTransitionEnd} textInputLabel={props.translate('optionsSelector.nameEmailOrPhoneNumber')} + textInputAlert={isOffline ? `${props.translate('common.youAppearToBeOffline')} ${props.translate('search.resultsAreLimited')}` : ''} safeAreaPaddingBottomStyle={safeAreaPaddingBottomStyle} autoFocus={false} ref={optionRef}