Skip to content

Commit e8c959c

Browse files
authored
Merge pull request #5734 from msupply-foundation/5733-samsung-negative-inputs
5733 remove numeric input mode for number inputs
2 parents 5dceb68 + 359aeff commit e8c959c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

client/packages/common/src/ui/components/inputs/TextInput/NumericTextInput.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ export const NumericTextInput = React.forwardRef<
195195
noFormatting = false,
196196
fullWidth,
197197
endAdornment,
198+
inputMode,
198199
...props
199200
},
200201
ref
@@ -273,7 +274,7 @@ export const NumericTextInput = React.forwardRef<
273274
},
274275
...sx,
275276
}}
276-
inputMode="numeric"
277+
inputMode={inputMode ?? 'numeric'}
277278
InputProps={{
278279
endAdornment: endAdornment ? (
279280
<InputAdornment position="end" sx={{ paddingBottom: '2px' }}>

client/packages/requisitions/src/RnRForms/DetailView/RnRFormLine.tsx

+5
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,11 @@ const RnRNumberCell = ({
360360
max={max}
361361
allowNegative={allowNegative}
362362
defaultValue={0}
363+
// NOTE: not setting input mode to text, because on Samsung tablets,
364+
// the numeric keyboard doesn't allow entering negative numbers!
365+
// Only needed for the negative columns, but better feel to have a consistent
366+
// keyboard as you click through the whole R&R form
367+
inputMode="text"
363368
/>
364369
</Tooltip>
365370
</td>

0 commit comments

Comments
 (0)