@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.
@@ -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={() => inputRef.current?.focus()}
275
+ onPress={focusAtEnd}
271
276
  disabled={disabled}
272
277
  >
273
278
  <SystemTextInput
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.168.1-beta.8",
3
+ "version": "0.168.1-beta.9",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {},