x-ui-design 0.4.90 → 0.4.92
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.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/lib/hooks/useForm.ts +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -773,7 +773,7 @@ const useForm = (initialValues = {}, onFieldsChange, onValuesChange, scrollToFir
|
|
|
773
773
|
const fieldsToValidate = nameList || Object.keys(formRef.current[stepRef.current]);
|
|
774
774
|
const results = await Promise.all(fieldsToValidate.map(name => validateField(name)));
|
|
775
775
|
if (_scrollToFirstError.current) {
|
|
776
|
-
const firstErrorContent = document.querySelectorAll('.xUi-
|
|
776
|
+
const firstErrorContent = document.querySelectorAll('.xUi-input-error')?.[0];
|
|
777
777
|
if (firstErrorContent) {
|
|
778
778
|
findFormItem(firstErrorContent.closest('.xUi-form-item'))?.scrollIntoView();
|
|
779
779
|
setScrollToFirstError(false);
|