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: packages/doc/generated/components/text-field.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ nav_order: 7
9
9
10
10
# Text Field
11
11
12
-
Visible `TextFieldLabel` composition remains the norm for form fields. A compact control such as topbar search may omit the label only when it supplies `accessibilityLabel`; development builds warn once when neither naming channel is authored. Use a `TextFieldHandle` ref for consumer-owned focus policy. Inputs belong in `<Modal mode="full">`; autofocus when the form subtree mounts, without waiting for the enter animation. For validation, call `ref.current?.focus()` from the invalid branch of the submit handler. The handle exposes only `focus()` and `blur()`—never the raw native input.
12
+
Visible `TextFieldLabel` composition remains the norm for form fields. A compact control such as topbar search may omit the label only when it supplies `accessibilityLabel`; development builds warn once when neither naming channel is authored. Native TextField is native-authoritative while typing: controlled `value` echoes acknowledge native edits instead of overwriting the buffer frame by frame. Use `sanitize` only for minimal synchronous character normalization; the function must be referentially stable, inexpensive, and non-throwing. Prefer `maxLength` for length limits because it requires no corrective write, and use `disabled`—not the non-public React Native `editable` prop—to block editing. A sanitizer write can cancel an active IME composition, so verify required keyboards. External rewrites racing a keystroke are user/native-first and may diverge visually for one frame; a later parent commit can request the rewrite again. A target string still present in the bounded pending-emit history is intentionally treated as an echo, the unavoidable ambiguity of the value-only API. Clear by setting the controlled `value` to `""`; it uses the same rewrite path, and no `clear()` handle is exposed. Avoid programmatic writes into focused secure fields. Render-path memoization is separate performance work: it may reduce latency but cannot correct controlled-input ordering. Use a `TextFieldHandle` ref for consumer-owned focus policy. Inputs belong in `<Modal mode="full">`; autofocus when the form subtree mounts, without waiting for the enter animation. For validation, call `ref.current?.focus()` from the invalid branch of the submit handler. The handle exposes only `focus()` and `blur()`—never the raw native input.
13
13
14
14
## API
15
15
@@ -25,6 +25,8 @@ Visible `TextFieldLabel` composition remains the norm for form fields. A compact
lead: 'Visible `TextFieldLabel` composition remains the norm for form fields. A compact control such as topbar search may omit the label only when it supplies `accessibilityLabel`; development builds warn once when neither naming channel is authored. Use a `TextFieldHandle` ref for consumer-owned focus policy. Inputs belong in `<Modal mode="full">`; autofocus when the form subtree mounts, without waiting for the enter animation. For validation, call `ref.current?.focus()` from the invalid branch of the submit handler. The handle exposes only `focus()` and `blur()`—never the raw native input.',
69
+
lead: 'Visible `TextFieldLabel` composition remains the norm for form fields. A compact control such as topbar search may omit the label only when it supplies `accessibilityLabel`; development builds warn once when neither naming channel is authored. Native TextField is native-authoritative while typing: controlled `value` echoes acknowledge native edits instead of overwriting the buffer frame by frame. Use `sanitize` only for minimal synchronous character normalization; the function must be referentially stable, inexpensive, and non-throwing. Prefer `maxLength` for length limits because it requires no corrective write, and use `disabled`—not the non-public React Native `editable` prop—to block editing. A sanitizer write can cancel an active IME composition, so verify required keyboards. External rewrites racing a keystroke are user/native-first and may diverge visually for one frame; a later parent commit can request the rewrite again. A target string still present in the bounded pending-emit history is intentionally treated as an echo, the unavoidable ambiguity of the value-only API. Clear by setting the controlled `value` to `""`; it uses the same rewrite path, and no `clear()` handle is exposed. Avoid programmatic writes into focused secure fields. Render-path memoization is separate performance work: it may reduce latency but cannot correct controlled-input ordering. Use a `TextFieldHandle` ref for consumer-owned focus policy. Inputs belong in `<Modal mode="full">`; autofocus when the form subtree mounts, without waiting for the enter animation. For validation, call `ref.current?.focus()` from the invalid branch of the submit handler. The handle exposes only `focus()` and `blur()`—never the raw native input.',
0 commit comments