Merged in fix/SW-1482-done-button-disabled (pull request #1205)
fix(SW-1482): done disabled in booking widget if no child age entered * fix(SW-1482): done disabled in booking widget if no child age entered Approved-by: Niclas Edenvin Approved-by: Matilda Landström
This commit is contained in:
@@ -70,7 +70,11 @@ export default function GuestsRoomsPickerDialog({
|
||||
if (fieldState.invalid) trigger("rooms")
|
||||
}, [roomsValue, getFieldState, trigger])
|
||||
|
||||
const isInvalid = getFieldState("rooms").invalid
|
||||
const isInvalid =
|
||||
getFieldState("rooms").invalid ||
|
||||
roomsValue.some((room) =>
|
||||
room.childrenInRoom.some((child) => child.age === undefined)
|
||||
)
|
||||
const canAddRooms = rooms.length < MAX_ROOMS
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user