Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Dec 20, 2023

Conversation

Palanikannan1437
Copy link
Collaborator

@Palanikannan1437 Palanikannan1437 commented Dec 20, 2023

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
4 of 5 checks passed
@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
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