Код: Выделить всё
useEffect(() => {
if (modal_ref.current) {
modal_ref.current.showModal();
} else {
modal_ref.current.close();
}
}, [foc]);
Подробнее здесь: https://stackoverflow.com/questions/796 ... -scrolling
Код: Выделить всё
useEffect(() => {
if (modal_ref.current) {
modal_ref.current.showModal();
} else {
modal_ref.current.close();
}
}, [foc]);