Test: Add support for n attempts for dynamic components

This commit is contained in:
Belen Curcio 2021-01-06 12:20:32 -03:00
parent 0b16b80dbe
commit f6ca1e3347

View File

@ -41,12 +41,12 @@ export default function FocusTrap({ children, focusFirst = false }: Props) {
// Attempt to focus the first el
tabbable(root.current)[0].focus()
}
i = i++
i = i + 1
} else {
// Clear interval after n attempts
clearInterval(timer)
}
}, 1000)
}, 100)
}
useEffect(() => {