sp-dev-fx-controls-react icon indicating copy to clipboard operation
sp-dev-fx-controls-react copied to clipboard

Maximum update depth exceeded when selecting a text in Rich Text Control

Open muecke36 opened this issue 1 year ago • 6 comments

Category

[ ] Enhancement

[X] Bug

[ ] Question

Version

Please specify what version of the library you are using: [3.11.0]

Expected / Desired Behavior / Question

No errors when selecting text

Observed Behavior

If I select text in the Richt Text Control the app crashes with the react error "Maximum update depth exceeded"

Steps to Reproduce

Select any text in a Rich Text Control

muecke36 avatar Apr 17 '23 06:04 muecke36

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

ghost avatar Apr 17 '23 06:04 ghost

Thank you for submitting your first issue to this project.

github-actions[bot] avatar Apr 17 '23 06:04 github-actions[bot]

Any news on this?

muecke36 avatar May 31 '23 11:05 muecke36

Hi @muecke36 , I've tried to reproduce the bug with no luck...can you please provide the code to reproduce it? Can you also provide which version of SPFx are you using?

GuidoZam avatar Jun 01 '23 15:06 GuidoZam

The code looks like this:

  <RichText
    value={values?.comment ?? "-"}
    onChange={(text) => {
      values.comment = text
      setValues(values, true)
      return text
    }}
  />

If I select the dash in the richt text control the error is thrown and the app crashes. The SPfx version is 1.15.2.

Dependencies look like this:

"@azure/msal-browser": "^2.32.2",
"@fluentui/example-data": "^8.3.0",
"@fluentui/react": "^8.60.1",
"@fluentui/react-file-type-icons": "^8.6.2",
"@microsoft/sp-core-library": "1.15.2",
"@microsoft/sp-lodash-subset": "1.15.2",
"@microsoft/sp-office-ui-fabric-core": "1.15.2",
"@microsoft/sp-page-context": "1.15.2",
"@microsoft/sp-property-pane": "1.15.2",
"@microsoft/sp-webpart-base": "1.15.2",
"@pnp/graph": "^3.7.0",
"@pnp/logging": "^3.7.0",
"@pnp/sp": "^3.7.0",
"@pnp/spfx-controls-react": "^3.11.0",
"csstype": "^3.0.10",
"cypress-msal-login": "^1.0.7",
"formik": "^2.2.9",
"js-cookie": "^3.0.1",
"luxon": "^2.3.1",
"office-ui-fabric-react": "7.185.7",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-hot-toast": "^2.2.0",
"react-router-dom": "^6.4.3",
"rxjs": "^7.5.5",
"typescript": "^4.5.5",
"uuid": "^9.0.0",
"yup": "^0.32.11"

muecke36 avatar Sep 04 '23 08:09 muecke36

Hi @muecke36 sorry for the late response, I tried recreating a project with the dependencies of your last post but still works like a charm, at this point I think that probably the issue is in your code, maybe there is a loop while setting the state?

GuidoZam avatar Mar 10 '24 14:03 GuidoZam