@flywheel-io/vision 21.8.1 → 21.8.2
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/package.json
CHANGED
|
@@ -1328,10 +1328,30 @@ declare class FwFormRendererComponent {
|
|
|
1328
1328
|
* re-runs validation so the field that was just blurred shows its errorText immediately
|
|
1329
1329
|
* (validateFields only assigns errorText for touched controls, and the blurred control's
|
|
1330
1330
|
* CVA already marked it touched before this native `focusout` handler runs). Wired to the
|
|
1331
|
-
* form's `focusout` so fields only appear/disappear/error once a field
|
|
1332
|
-
* than on every keystroke.
|
|
1331
|
+
* form's `focusout` so continuous (typed) fields only appear/disappear/error once a field
|
|
1332
|
+
* loses focus, rather than on every keystroke. Discrete fields (radio/select/checkbox/switch/
|
|
1333
|
+
* date) don't need to wait for this — see recomputeIfDiscreteChanged.
|
|
1333
1334
|
*/
|
|
1334
1335
|
onFieldBlur(): void;
|
|
1336
|
+
/**
|
|
1337
|
+
* Recomputes visibility immediately (independent of focus/blur) when a *discrete* field's
|
|
1338
|
+
* value changed on this tick — e.g. a radio/select/checkbox/switch/date selection. Those
|
|
1339
|
+
* controls commit their value in a single click rather than keystroke-by-keystroke, so there's
|
|
1340
|
+
* no "flicker while typing" concern gating them behind onFieldBlur, unlike text-style inputs.
|
|
1341
|
+
*
|
|
1342
|
+
* This also sidesteps a DOM event-ordering race specific to controls whose native element
|
|
1343
|
+
* fires its own `focusout` (e.g. a radio `<input>`): clicking a different option in the same
|
|
1344
|
+
* group fires `focusout` on the previously-focused option — bubbling up and running
|
|
1345
|
+
* onFieldBlur — before `change` fires on the newly-clicked option and writes its value into
|
|
1346
|
+
* the FormGroup. onFieldBlur alone would therefore always evaluate against the *previous*
|
|
1347
|
+
* selection. Recomputing here, from the value-change itself, evaluates against the value that
|
|
1348
|
+
* actually just changed.
|
|
1349
|
+
*
|
|
1350
|
+
* Returns whether visibility was recomputed, so the caller can re-run validation against the
|
|
1351
|
+
* updated requiredByKey.
|
|
1352
|
+
*/
|
|
1353
|
+
private recomputeIfDiscreteChanged;
|
|
1354
|
+
private applyVisibility;
|
|
1335
1355
|
/**
|
|
1336
1356
|
* Marks every control touched/dirty and triggers validation immediately, then flips
|
|
1337
1357
|
* validation into live (onChange) mode for the remainder of the form's lifetime. Call
|