fix(public-booking): enhance focus behavior for customer name input on slot selection
This commit is contained in:
@@ -1174,7 +1174,11 @@ function SelectedSlotCard(props: BookingShellProps & { compact?: boolean }) {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!selectedSlot) return;
|
if (!selectedSlot) return;
|
||||||
|
|
||||||
customerNameInputRef.current?.focus();
|
const input = customerNameInputRef.current;
|
||||||
|
if (!input) return;
|
||||||
|
|
||||||
|
input.focus();
|
||||||
|
input.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||||
}, [selectedSlot]);
|
}, [selectedSlot]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user