Skip to content

Commit

Permalink
Fix number-keyboard issue on iOS for level attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
elektrolytmangel committed Oct 24, 2024
1 parent 4d1d613 commit 2cdd49c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions app/src/components/TextForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const TextForm = ({
errors,
errorMsg,
disabled,
inputMode,
}) => {
const [switchValue, setSwitchValue] = useState(false);
const [tempValue, setTempValue] = useState('');
Expand Down Expand Up @@ -66,7 +65,6 @@ const TextForm = ({
editable={!switchValue}
returnKeyType={multiline ? 'default' : 'done'}
readOnly={disabled}
inputMode={inputMode ?? 'text'}
/>
);
}
Expand Down
3 changes: 2 additions & 1 deletion app/src/config/createForm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { isPossiblePhoneNumber, isValidPhoneNumber, validatePhoneNumberLength } from 'libphonenumber-js';
import opening_hours from 'opening_hours';
import { Platform } from 'react-native';

const openingHoursErrorsAndWarnings = (value) => {
let msg = '';
Expand Down Expand Up @@ -50,7 +51,7 @@ export default [
placeholder: 'placeholder_level',
defaultValue: '',
errorMsg: 'error_level',
inputMode: 'numeric',
keyboardType: Platform.OS == 'ios' ? 'numbers-and-punctuation' : 'numeric',
},
{
name: 'description',
Expand Down
1 change: 0 additions & 1 deletion app/src/screens/CreateScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ const CreateScreen = ({ navigation }) => {
useSwitch={formComp.useSwitch}
placeholder={formComp.placeholder}
disabled={defiState.creating}
inputMode={formComp.inputMode}
/>
);
} else if (formComp.type === 'Switch') {
Expand Down

0 comments on commit 2cdd49c

Please sign in to comment.