@momo-kits/foundation 0.168.1-beta.8 → 0.168.1-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Input/InputMoney.tsx +6 -1
- package/package.json +1 -1
package/Input/InputMoney.tsx
CHANGED
|
@@ -198,6 +198,11 @@ const InputMoney = forwardRef(
|
|
|
198
198
|
updateNumericValue(digits);
|
|
199
199
|
};
|
|
200
200
|
|
|
201
|
+
const focusAtEnd = () => {
|
|
202
|
+
inputRef.current?.focus();
|
|
203
|
+
inputRef.current?.setSelection(displayValue.length, displayValue.length);
|
|
204
|
+
};
|
|
205
|
+
|
|
201
206
|
const _onFocus = (e: TextInputFocusEvent) => {
|
|
202
207
|
setFocused(true);
|
|
203
208
|
onFocus?.(e);
|
|
@@ -267,7 +272,7 @@ const InputMoney = forwardRef(
|
|
|
267
272
|
/>
|
|
268
273
|
<Pressable
|
|
269
274
|
style={[styles.inputView, styles.moneyInputView]}
|
|
270
|
-
onPress={
|
|
275
|
+
onPress={focusAtEnd}
|
|
271
276
|
disabled={disabled}
|
|
272
277
|
>
|
|
273
278
|
<SystemTextInput
|