Repository navigation
Patch release of Gridory: the lists of CountrySelect and PhoneInput scroll with the mouse wheel and with a
finger inside a modal. No props, types or exports change, and outside a modal everything works as in 2.3.0.
English
Upgrade
npm install gridory@2.3.1No code changes needed.
Fixed
- Wheel and touch scrolling inside a modal. Inside a modal that locks the page scroll (Radix
Dialog,
AlertDialogandSheet, shadcn's included, orreact-remove-scroll), the country list ofCountrySelectand the
dial code list ofPhoneInputdid not move with the mouse wheel or a finger; the keyboard and the scrollbar did.
The lock cancels any wheel or touch move that starts outside the dialog, and the panel renders in a portal under
<body>. Now the panel keeps those gestures and the list scrolls; the page and the dialog behind it stay still,
also at the end of the list. It covers the phone field ofLoginFormandSignUpFormtoo.
Good to know
- The wheel and touch moves that start over an open panel no longer reach
document: awheelortouchmove
listener there, or a ReactonWheel/onTouchMoveon an ancestor, does not receive them. - Outside a modal nothing changes: at the end of the list the wheel goes on to scroll the page, as before.
See the Country select
and Phone input guides.
Español
Actualizar
npm install gridory@2.3.1No hace falta cambiar código.
Corregido
- Rueda y dedo dentro de un modal. Dentro de un modal que bloquea el desplazamiento de la página (
Dialog,
AlertDialogySheetde Radix, incluidos los de shadcn, oreact-remove-scroll), la lista de países de
CountrySelecty la de prefijos dePhoneInputno se movían con la rueda del mouse ni con el dedo; el teclado y la
barra sí. El bloqueo cancela la rueda y los arrastres táctiles que nacen fuera de la ventana, y el panel se
renderiza en un portal bajo<body>. Ahora el panel se queda con esos gestos y la lista se desplaza; la página y la
ventana de atrás quedan quietas, también al llegar al final de la lista. Cubre también el teléfono deLoginFormy
SignUpForm.
Para tener en cuenta
- La rueda y los arrastres táctiles que nacen sobre un panel abierto ya no llegan a
document: un listener de
wheelotouchmoveahí, o unonWheel/onTouchMovede React en un ancestro, no los recibe. - Fuera de un modal no cambia nada: al llegar al final de la lista, la rueda sigue desplazando la página, como antes.
Ver las guías de Selector de país
y Teléfono.