Skip to content

Commit b51578c

Browse files
committed
Ensure pasted values properly update path
This fixes an issue where pasting values instead of typing them would lead to stale page data, effectively ignoring the pasted value in path creation. This is solved by explicitly adding the new segment to the page object.
1 parent a6500e0 commit b51578c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/components/events/partials/ModalTabsAndPages/NewTobiraPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ const NewTobiraPage = <T extends TobiraFormProps>({
188188
...kind === "title"
189189
? { title: e.target.value }
190190
: {
191-
path: updatePath(p, e.target.value),
191+
path: updatePath({ ...p, segment: e.target.value }, e.target.value),
192192
segment: e.target.value,
193193
},
194194
};

0 commit comments

Comments
 (0)