You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -54,8 +54,8 @@ Use `inputRef` instead of `ref` if you need input node to manage focus, selectio
54
54
### `beforeMaskedValueChange` : `function`
55
55
56
56
In case you need to implement more complex masking behavior, you can provide `beforeMaskedValueChange` function to change masked value and cursor position before it will be applied to the input. `beforeMaskedValueChange` receives following arguments:
57
-
1.**value** (string): New masked value.
58
-
2.**cursorPosition** (number): New cursor position. `null` if change was triggered by the `blur` event.
57
+
1.**newState** (object): New input state. Contains `value` and `selection` fields. `selection` is null on input blur. Example: `{ value: '12/1_/____', selection: { start: 4, end: 4 } }`
58
+
2.**oldState** (object): Input state before change. Contains `value` and `selection` fields. `selection` is null on input focus.
59
59
3.**userInput** (string): Raw entered or pasted string. `null` if user didn't enter anything (e.g. triggered by deletion or rerender due to props change).
0 commit comments