Skip to content

fix: Resolved page not saving/not copying contents bug - #3203

Merged
sriramveeraghanta merged 1 commit into
previewfrom
fix/page-not-saving-not-copying-content
Dec 20, 2023
Merged

fix: Resolved page not saving/not copying contents bug#3203
sriramveeraghanta merged 1 commit into
previewfrom
fix/page-not-saving-not-copying-content

Conversation

@Palanikannan1437

@Palanikannan1437 Palanikannan1437 commented Dec 20, 2023

Copy link
Copy Markdown
Contributor

Description

  1. This PR adds fix to the duplicatePage function, which allows users to duplicate a page even before they start typing in the editor i.e. if the current page's form does not have a description_html value yet i.e. on editor initialisation, it will be set to the default value from the pageDetails object fetched from the backend via SWR. The formData object is updated with the necessary values for duplication, including the new/updated page name and description.

  2. Additionally to fix the patch call not being made on typing, the handleSubmit dependency of pageDetails is included in the useCallback hook of the debounce function to ensure proper form submission such that the name field is always updated for the updatePage function as it's wrapped in useCallback.

This commit adds a duplicate_page function to the PageDetailsPage component, which allows users to duplicate a page. If the current page does not have a description_html value, it will be set to the default value from the pageDetails object. The formData object is updated with the necessary values for duplication, including the new page name and description. Additionally, the handleSubmit dependency is included in the useEffect hook to ensure proper form submission.
@sriramveeraghanta
sriramveeraghanta merged commit e141091 into preview Dec 20, 2023
@sriramveeraghanta
sriramveeraghanta deleted the fix/page-not-saving-not-copying-content branch December 20, 2023 13:24
@sriramveeraghanta sriramveeraghanta added this to the v0.14.2-dev milestone Dec 29, 2023
DoctorFogarty pushed a commit to DoctorFogarty/plane that referenced this pull request Aug 7, 2026
This commit adds a duplicate_page function to the PageDetailsPage component, which allows users to duplicate a page. If the current page does not have a description_html value, it will be set to the default value from the pageDetails object. The formData object is updated with the necessary values for duplication, including the new page name and description. Additionally, the handleSubmit dependency is included in the useEffect hook to ensure proper form submission.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]: page contents aren't saved

2 participants