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

WebPartTitle Control Fails to Update After Initial Save #1921

Closed
ACM-V opened this issue Dec 12, 2024 · 3 comments
Closed

WebPartTitle Control Fails to Update After Initial Save #1921

ACM-V opened this issue Dec 12, 2024 · 3 comments
Labels
status:duplicate Duplicate of another issue. See comments for reference to other issue. Duplicates typically closed. status:fixed-next-drop Issue will be fixed in upcoming release.

Comments

@ACM-V
Copy link

ACM-V commented Dec 12, 2024

Category
[ ] Enhancement

[x] Bug

[ ] Question

Version
v3.20.0

This issue persists in previous release 3.19.0 also and an issue has been reported for the same .

Expected Behavior
The WebPart title should be editable dynamically every time the WebPart is in edit mode, not just during the initial setup.

Observed Behavior
The WebPart title can only be set once, during the initial addition of the WebPart.
The event appears to propagate correctly, but the WebPart does not re-render, leading to the observed faulty behavior.
Note: Users have reported that this faulty behavior started appearing a couple of days ago.
Forcing a re-render by adding this.render() resolves the issue, but this would require updating all existing components. Additionally, this requirement is not documented as mandatory.

updateProperty: (value: string) => { this.properties.title = value; this.render(); }}

Steps to Reproduce:

  1. Scaffold a new SPFx React solution using SPFx v1.19.0.
  2. Ensure you are using Node.js v18.20.4
  3. Implement the WebPartTitle Control as per the PnP WebPartTitle documentation.
  4. Add the WebPart to a SharePoint page.
  5. Publish the page.
  6. Edit the page and attempt to update the WebPart title.
Copy link

Thank you for submitting your first issue to this project.

@joelfmrodrigues
Copy link
Collaborator

@ACM-V I believe this is a duplicate of #1877
We merged a PR yesterday to address this issue. Can you please test with the beta release, version 3.21.0?
npm i @pnp/[email protected]

@joelfmrodrigues joelfmrodrigues added status:duplicate Duplicate of another issue. See comments for reference to other issue. Duplicates typically closed. status:fixed-next-drop Issue will be fixed in upcoming release. labels Dec 12, 2024
@joelfmrodrigues
Copy link
Collaborator

@ACM-V I will close this item as duplicate with the assumption that this is the same issue as #1877 and that it's resolved in the beta release, but please @ mention me here if you still find this issue on the beta release and I will reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:duplicate Duplicate of another issue. See comments for reference to other issue. Duplicates typically closed. status:fixed-next-drop Issue will be fixed in upcoming release.
Projects
None yet
Development

No branches or pull requests

2 participants