diff --git a/src/components/RoomNameInput/index.js b/src/components/RoomNameInput/index.js index 0ee74c6b6780..1597acab7cd5 100644 --- a/src/components/RoomNameInput/index.js +++ b/src/components/RoomNameInput/index.js @@ -2,12 +2,11 @@ import React, {useState} from 'react'; import _ from 'underscore'; import TextInput from '@components/TextInput'; import useLocalize from '@hooks/useLocalize'; -import getOperatingSystem from '@libs/getOperatingSystem'; import * as RoomNameInputUtils from '@libs/RoomNameInputUtils'; import CONST from '@src/CONST'; import * as roomNameInputPropTypes from './roomNameInputPropTypes'; -function RoomNameInput({isFocused, autoFocus, disabled, errorText, forwardedRef, value, onBlur, onChangeText, onInputChange, shouldDelayFocus, ...restProps}) { +function RoomNameInput({isFocused, autoFocus, disabled, errorText, forwardedRef, value, onBlur, onChangeText, onInputChange, shouldDelayFocus, prefixCharacter, ...restProps}) { const {translate} = useLocalize(); const [selection, setSelection] = useState(); @@ -42,6 +41,7 @@ function RoomNameInput({isFocused, autoFocus, disabled, errorText, forwardedRef, setSelection(newSelection); } }; + return ( {}, autoFocus: false, shouldDelayFocus: false, + prefixCharacter: CONST.POLICY.ROOM_PREFIX, }; export {propTypes, defaultProps}; diff --git a/src/pages/settings/Report/RoomNamePage.js b/src/pages/settings/Report/RoomNamePage.js index f4df6f89cfe7..9ae98cc067cc 100644 --- a/src/pages/settings/Report/RoomNamePage.js +++ b/src/pages/settings/Report/RoomNamePage.js @@ -14,7 +14,6 @@ import compose from '@libs/compose'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; import * as ReportUtils from '@libs/ReportUtils'; -import * as RoomNameInputUtils from '@libs/RoomNameInputUtils'; import * as ValidationUtils from '@libs/ValidationUtils'; import withReportOrNotFound from '@pages/home/report/withReportOrNotFound'; import reportPropTypes from '@pages/reportPropTypes'; @@ -103,7 +102,6 @@ function RoomNamePage({policy, report, reports, translate}) { inputID="roomName" defaultValue={report.reportName} isFocused={isFocused} - prefixCharacter={CONST.POLICY.ROOM_PREFIX} /> diff --git a/src/pages/workspace/WorkspaceNewRoomPage.js b/src/pages/workspace/WorkspaceNewRoomPage.js index b0d4c0b1b53f..49880cce8048 100644 --- a/src/pages/workspace/WorkspaceNewRoomPage.js +++ b/src/pages/workspace/WorkspaceNewRoomPage.js @@ -264,7 +264,6 @@ function WorkspaceNewRoomPage(props) { isFocused={props.isFocused} shouldDelayFocus autoFocus - prefixCharacter={CONST.POLICY.ROOM_PREFIX} />