diff --git a/package-lock.json b/package-lock.json index 652b28ab1777..e0908cb9b10a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -83,7 +83,7 @@ "react-native-linear-gradient": "^2.8.1", "react-native-localize": "^2.2.6", "react-native-modal": "^13.0.0", - "react-native-onyx": "1.0.52", + "react-native-onyx": "1.0.61", "react-native-pager-view": "^6.2.0", "react-native-pdf": "^6.6.2", "react-native-performance": "^4.0.0", @@ -42680,13 +42680,12 @@ } }, "node_modules/react-native-onyx": { - "version": "1.0.52", - "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.52.tgz", - "integrity": "sha512-lfIg+tSd+HZF00pr2oFoLY3iTdGYGC6Dd44/YktTsVKB/yIcUq61wBMOitX54Z54ac2/eHKFPicEr2xvBhE2VQ==", + "version": "1.0.61", + "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.61.tgz", + "integrity": "sha512-8lESU3qczhhWzyJSViZsgREyCZP+evLcrfZ9xmH5ys0PXWVpxUymxZ6zfTWbWlAkCQCFpYSikk2fXcpC6clF0g==", "dependencies": { "ascii-table": "0.0.9", "fast-equals": "^4.0.3", - "lodash": "^4.17.21", "underscore": "^1.13.1" }, "engines": { @@ -79212,13 +79211,12 @@ } }, "react-native-onyx": { - "version": "1.0.52", - "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.52.tgz", - "integrity": "sha512-lfIg+tSd+HZF00pr2oFoLY3iTdGYGC6Dd44/YktTsVKB/yIcUq61wBMOitX54Z54ac2/eHKFPicEr2xvBhE2VQ==", + "version": "1.0.61", + "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.61.tgz", + "integrity": "sha512-8lESU3qczhhWzyJSViZsgREyCZP+evLcrfZ9xmH5ys0PXWVpxUymxZ6zfTWbWlAkCQCFpYSikk2fXcpC6clF0g==", "requires": { "ascii-table": "0.0.9", "fast-equals": "^4.0.3", - "lodash": "^4.17.21", "underscore": "^1.13.1" } }, diff --git a/package.json b/package.json index 550cd43ca632..0c03f4946874 100644 --- a/package.json +++ b/package.json @@ -122,7 +122,7 @@ "react-native-linear-gradient": "^2.8.1", "react-native-localize": "^2.2.6", "react-native-modal": "^13.0.0", - "react-native-onyx": "1.0.52", + "react-native-onyx": "1.0.61", "react-native-pager-view": "^6.2.0", "react-native-pdf": "^6.6.2", "react-native-performance": "^4.0.0", diff --git a/src/components/EmojiPicker/EmojiPicker.js b/src/components/EmojiPicker/EmojiPicker.js index 2a3a7ba296f2..9dbd9dc3fc29 100644 --- a/src/components/EmojiPicker/EmojiPicker.js +++ b/src/components/EmojiPicker/EmojiPicker.js @@ -1,5 +1,5 @@ import React, {useState, useEffect, useRef, forwardRef, useImperativeHandle} from 'react'; -import {Dimensions, Keyboard} from 'react-native'; +import {Dimensions} from 'react-native'; import _ from 'underscore'; import EmojiPickerMenu from './EmojiPickerMenu'; import CONST from '../../CONST'; @@ -119,10 +119,6 @@ const EmojiPicker = forwardRef((props, ref) => { useImperativeHandle(ref, () => ({showEmojiPicker, isActiveReportAction, hideEmojiPicker, isEmojiPickerVisible, resetEmojiPopoverAnchor})); useEffect(() => { - if (isEmojiPickerVisible) { - Keyboard.dismiss(); - } - const emojiPopoverDimensionListener = Dimensions.addEventListener('change', () => { if (!emojiPopoverAnchor.current) { // In small screen width, the window size change might be due to keyboard open/hide, we should avoid hide EmojiPicker in those cases diff --git a/src/components/Form.js b/src/components/Form.js index c77412b01254..eb6945f6ec78 100644 --- a/src/components/Form.js +++ b/src/components/Form.js @@ -89,7 +89,6 @@ const defaultProps = { isSubmitButtonVisible: true, formState: { isLoading: false, - errors: null, }, draftValues: {}, enabledWhenOffline: false, diff --git a/src/components/OptionsSelector/BaseOptionsSelector.js b/src/components/OptionsSelector/BaseOptionsSelector.js index b894e8c3bfc1..7273616ea57e 100755 --- a/src/components/OptionsSelector/BaseOptionsSelector.js +++ b/src/components/OptionsSelector/BaseOptionsSelector.js @@ -96,18 +96,6 @@ class BaseOptionsSelector extends Component { ); this.scrollToIndex(this.props.selectedOptions.length ? 0 : this.state.focusedIndex, false); - - if (!this.props.autoFocus) { - return; - } - - if (this.props.shouldShowTextInput) { - if (this.props.shouldDelayFocus) { - this.focusTimeout = setTimeout(() => this.textInput.focus(), CONST.ANIMATED_TRANSITION); - } else { - this.textInput.focus(); - } - } } componentDidUpdate(prevProps) { @@ -339,6 +327,8 @@ class BaseOptionsSelector extends Component { selectTextOnFocus blurOnSubmit={Boolean(this.state.allOptions.length)} spellCheck={false} + autoFocus={this.props.autoFocus} + shouldDelayFocus={this.props.shouldDelayFocus} /> ); const optionsList = ( diff --git a/src/libs/actions/IOU.js b/src/libs/actions/IOU.js index c5e2c532a888..339c7d999dc8 100644 --- a/src/libs/actions/IOU.js +++ b/src/libs/actions/IOU.js @@ -1596,6 +1596,7 @@ function createEmptyTransaction() { function navigateToNextPage(iou, iouType, reportID, report) { const moneyRequestID = `${iouType}${reportID}`; const shouldReset = iou.id !== moneyRequestID; + // If the money request ID in Onyx does not match the ID from params, we want to start a new request // with the ID from params. We need to clear the participants in case the new request is initiated from FAB. if (shouldReset) { diff --git a/src/libs/actions/QueuedOnyxUpdates.js b/src/libs/actions/QueuedOnyxUpdates.js index d25f44a9aa60..486108dd56cf 100644 --- a/src/libs/actions/QueuedOnyxUpdates.js +++ b/src/libs/actions/QueuedOnyxUpdates.js @@ -14,7 +14,7 @@ Onyx.connect({ * @returns {Promise} */ function queueOnyxUpdates(updates) { - return Onyx.merge(ONYXKEYS.QUEUED_ONYX_UPDATES, updates); + return Onyx.set(ONYXKEYS.QUEUED_ONYX_UPDATES, [...queuedOnyxUpdates, ...updates]); } function clear() {