@thecb/components 6.1.0-beta.2 → 6.1.0-beta.3
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/dist/index.cjs.js
CHANGED
|
@@ -43662,8 +43662,10 @@ var useFocusInvalidInput = function useFocusInvalidInput() {
|
|
|
43662
43662
|
// typically set to "true" on attempted form submission, if errors exist
|
|
43663
43663
|
React.useEffect(function () {
|
|
43664
43664
|
if (showErrors) {
|
|
43665
|
+
var _inputsWithErrors$;
|
|
43666
|
+
|
|
43665
43667
|
var inputsWithErrors = document.querySelectorAll("input[aria-invalid=true]");
|
|
43666
|
-
|
|
43668
|
+
inputsWithErrors === null || inputsWithErrors === void 0 ? void 0 : (_inputsWithErrors$ = inputsWithErrors[0]) === null || _inputsWithErrors$ === void 0 ? void 0 : _inputsWithErrors$.focus();
|
|
43667
43669
|
}
|
|
43668
43670
|
}, [showErrors]);
|
|
43669
43671
|
};
|