Merged in feat/sw-1245-bw-button-update (pull request #2262)

Feat/sw 1245 - Booking widget - change button text when new values

* feat(sw-1245) - use isDirty to update button text

* Change text only in booking flow

* Revert test code


Approved-by: Michael Zetterberg
This commit is contained in:
Linus Flood
2025-06-02 13:37:53 +00:00
parent 7694a188da
commit 81887c83ff
7 changed files with 79 additions and 37 deletions

View File

@@ -58,6 +58,7 @@ export default function GuestsRoomsPickerDialog({
const handleAddRoom = useCallback(() => {
setValue("rooms", [...roomsValue, { adults: 1, childrenInRoom: [] }], {
shouldValidate: true,
shouldDirty: true,
})
}, [roomsValue, setValue])
@@ -66,7 +67,7 @@ export default function GuestsRoomsPickerDialog({
setValue(
"rooms",
roomsValue.filter((_, i) => i !== index),
{ shouldValidate: true }
{ shouldValidate: true, shouldDirty: true }
)
},
[roomsValue, setValue]