Commit c753d5e
fix(form-core): prevent double re-render when no async validators (#1929)
* fix(form-core): prevent double re-render when no async validators
Fields were re-rendering twice on each keystroke because `isValidating`
was being toggled (true -> false) even when there were no async validators.
This fix checks if there are actual async validators before setting
`isValidating` state, preventing unnecessary re-renders.
Fixes #1130
* ci: apply automated fixes and generate docs
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>1 parent e15267c commit c753d5e
File tree
3 files changed
+73
-11
lines changed- .changeset
- packages/form-core
- src
- tests
3 files changed
+73
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1728 | 1728 | | |
1729 | 1729 | | |
1730 | 1730 | | |
1731 | | - | |
1732 | | - | |
1733 | | - | |
1734 | | - | |
1735 | | - | |
1736 | | - | |
1737 | | - | |
1738 | | - | |
1739 | 1731 | | |
1740 | 1732 | | |
1741 | 1733 | | |
1742 | 1734 | | |
1743 | 1735 | | |
1744 | 1736 | | |
1745 | 1737 | | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
1746 | 1755 | | |
1747 | 1756 | | |
1748 | 1757 | | |
| |||
1845 | 1854 | | |
1846 | 1855 | | |
1847 | 1856 | | |
1848 | | - | |
| 1857 | + | |
| 1858 | + | |
| 1859 | + | |
1849 | 1860 | | |
1850 | | - | |
1851 | | - | |
| 1861 | + | |
| 1862 | + | |
| 1863 | + | |
1852 | 1864 | | |
1853 | 1865 | | |
1854 | 1866 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
797 | 797 | | |
798 | 798 | | |
799 | 799 | | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
800 | 841 | | |
801 | 842 | | |
802 | 843 | | |
| |||
0 commit comments