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

layout crashed when using controlled and cache together and open 8 tabs and drag tab from left to right quickly and repeat for few times.. #198

Open
RobertCLian opened this issue Mar 2, 2023 · 1 comment · May be fixed by #214

Comments

@RobertCLian
Copy link

Hi,

many thanks for your excellent layout, the experience is very good.

this week I got below error in my project sometimes and did not know what cause the issue,

So i copy code of demo of controlled-layout and config those tabs to cached.

(tabs: [{id: 't3', cached: true}, {id: 't4', cached: true}, {id: 't5', cached: true}, {id: 't6', cached: true},{id: 't7', cached: true}, {id: 't8', cached: true}, {id: 't19', cached: true}, {id: 't10', cached: true}])

then drag tab t3 to right side of t5 and repeat the action quickly.

try for few times or sometimes more than ten times, the layout page crash and get below issue.

could u please have a try and help to fix,

many thanks.

UIErrorBoundaryPanel's componentDidCatch Error: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.
at checkForNestedUpdates (react-dom.development.js:27296:1)
at scheduleUpdateOnFiber (react-dom.development.js:25480:1)
at Object.enqueueForceUpdate (react-dom.development.js:14124:1)
at Component.forceUpdate (react.development.js:377:1)
at DockLayout.updateTabCache (DockLayout.js:77:1)
at DockTabPane.updateCache (DockTabPane.js:27:1)
at DockTabPane.componentDidUpdate (DockTabPane.js:66:1)
at commitLayoutEffectOnFiber (react-dom.development.js:23337:1)
at commitLayoutMountEffects_complete (react-dom.development.js:24691:1)
at commitLayoutEffects_begin (react-dom.development.js:24677:1) {componentStack: '\n at DockTabPane (http://localhost:3000/UI/stat…ttp://localhost:3000/UI/static/js/bundle.js:43:1)'}

@vardhan03
Copy link

@RobertCLian, can you please let me know if you have found any workaround to this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants