diff --git a/packages/react-native-web/src/exports/TextInput/__tests__/index-test.js b/packages/react-native-web/src/exports/TextInput/__tests__/index-test.js index 5a7986674..c2c1c7580 100644 --- a/packages/react-native-web/src/exports/TextInput/__tests__/index-test.js +++ b/packages/react-native-web/src/exports/TextInput/__tests__/index-test.js @@ -171,18 +171,21 @@ describe('components/TextInput', () => { const { container } = render(); const input = findInput(container); expect(input.inputMode).toEqual('decimal'); + expect(input.type).toEqual('number'); }); test('value "number-pad"', () => { const { container } = render(); const input = findInput(container); expect(input.inputMode).toEqual('numeric'); + expect(input.type).toEqual('number'); }); test('value "numeric"', () => { const { container } = render(); const input = findInput(container); expect(input.inputMode).toEqual('numeric'); + expect(input.type).toEqual('number'); }); test('value "phone-pad"', () => { diff --git a/packages/react-native-web/src/exports/TextInput/index.js b/packages/react-native-web/src/exports/TextInput/index.js index a37dd8ca8..f6b20acb2 100644 --- a/packages/react-native-web/src/exports/TextInput/index.js +++ b/packages/react-native-web/src/exports/TextInput/index.js @@ -142,9 +142,11 @@ const TextInput: React.AbstractComponent< case 'number-pad': case 'numeric': inputMode = 'numeric'; + type = 'number'; break; case 'decimal-pad': inputMode = 'decimal'; + type = 'number'; break; case 'phone-pad': type = 'tel';