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

RichText does not reflect the changed value #650

Closed
nbelyh opened this issue Sep 3, 2020 · 3 comments
Closed

RichText does not reflect the changed value #650

nbelyh opened this issue Sep 3, 2020 · 3 comments

Comments

@nbelyh
Copy link
Contributor

nbelyh commented Sep 3, 2020

Category

[ ] Enhancement
[x] Bug
[x] Question

Version

Please specify what version of the library you are using: 1.19.0
Also tested in 2.0beta - still no luck.

Expected / Desired Behavior / Question

I expect the RichText control to show updated text if I change it's value property

Observed Behavior

The displayed value does not change.

Steps to Reproduce

Create default SPFx project using yeoman.
Add dependency to spfx-controls-react to the project.

Then change the contents of the HelloWorld.tsx to:

import * as React from 'react';
import { IHelloWorldProps } from './IHelloWorldProps';
import { RichText } from "@pnp/spfx-controls-react/lib/RichText";

export default function HelloWorld(props: IHelloWorldProps) {

  const [html, setHtml] = React.useState('OLD');

  return (<div>
    {html}
    <RichText value={html} />
    <button onClick={() => setHtml('NEW')} >CLICK ME</button>
  </div>);
}

Open the project in the workbench.
Click the button "CLICK ME".
Observe the HTML value changed, but the rich text is still displaying the old value.

@ghost
Copy link

ghost commented Sep 3, 2020

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@michaelmaillot
Copy link
Collaborator

Hi @nbelyh,

Do you still have issues with this? Latest version handles value change correctly.

@nbelyh
Copy link
Contributor Author

nbelyh commented Aug 5, 2023

Just re-check - now it looks fine. Closing the issue.

@nbelyh nbelyh closed this as completed Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants