-
Notifications
You must be signed in to change notification settings - Fork 137
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: show table summary is not reactive in pivot table #388
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Risk Level 2 - /home/runner/work/graphic-walker/graphic-walker/packages/graphic-walker/src/components/pivotTable/utils.ts The code changes seem to be well written and follow good practices. However, there are a few areas that could be improved for better readability and performance:
Here are some example code snippets for the suggested changes: // Use a Set for constant time lookup
const collapsedKeySet = new Set(collapsedKeyList);
if (collapsedKeySet.has(tree.uniqueKey)) {
tree.isCollapsed = true;
}
// Use a Map for constant time lookup
const childMap = new Map(tree.children.map(c => [c.key, c]));
let child = childMap.get(key); Risk Level 2 - /home/runner/work/graphic-walker/graphic-walker/packages/graphic-walker/src/components/pivotTable/index.tsx The code changes seem to be well-structured and follow good practices. However, there are a few areas that could be improved:
.catch((err) => {
appRef.current?.updateRenderStatus('error');
setIsLoading(false);
// Add user-friendly error handling
alert('An error occurred while generating the table. Please try again.');
});
.finally(() => {
setIsLoading(false);
});
🔍📈🔧 Powered by Code Review GPT |
* chore: reduce unneed computation * fix: show table summary is not reactive * fix: field position & reactive
This PR fixed a bug that caused by a dependency is missed so the table summary feature cannot reactive immediately.