()
| 34 | |
| 35 | const isInitialRender = React.useRef(true); |
| 36 | const appendQuestion = () => { |
| 37 | append({ |
| 38 | text: '', |
| 39 | }); |
| 40 | |
| 41 | if (errors.questions?.type === 'min') { |
| 42 | clearErrors('questions'); // always clear errors when there is add action. |
| 43 | } |
| 44 | }; |
| 45 | |
| 46 | React.useEffect(() => { |
| 47 | if (!fields.length && !isInitialRender.current) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…