You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The useEffect that syncs frame headers to block columns references setData and frameHeaders, but they are not included in the dependency array. This can lead to stale closures or missed updates when those values change.
/** * Anytime our Frame Headers, we need to sync our column block data with our source of truth ^ */useEffect(()=>{if(data.columns.length===0&&!frameHeaders.isLoading){// If no columns are defined, fetch the frame headersif(frameHeaders.data.list.length>0){syncBlockDataColumns(frameHeaders);}}},[frameHeaders.data.list]);
The evaluate function parses cell values with parseFloat without guarding against non-numeric inputs. If parsing fails, NaN comparisons will always return false and may misapply color rules. Consider validating or defaulting values before comparison.
A console.log and a // TODO: NEEDS FIX ^ comment remain after overriding userDetails for adminMode. Remove or resolve this before merge to avoid noise and potential logic issues.
// Update userDetails to AUTHOR if ADMINconstgetMembers=useAPI(getMembersApi);constuserDetails=!adminMode
? useAPI(getUserDataApi)
: {data: {permission: 'OWNER',},status: 'SUCCESS',};
The debounced callback is recreated on every render, losing pending invocations. Memoize the debounced function so its internal timer persists across renders.
Why: Memoizing debouncedCallback with useMemo prevents its timer from resetting every render, ensuring pending invocations aren’t lost and improving performance.
Low
General
Fix toolbar slot conditional
The toolbar slot expects a component or undefined, but passing a boolean or empty string breaks MUI slot loading. Use a conditional expression that yields GridToolbar only when a title exists, otherwise undefined.
Why: Using titleSettings.chartTitle && GridToolbar can yield an empty string rather than undefined, which may break MUI slot loading; the ternary ensures a component or undefined.
Low
Add missing effect dependencies
The effect only tracks frameHeaders.data.list and ignores data.columns, which can cause stale checks or missed updates. Include data.columns.length and syncBlockDataColumns in the dependency array for correctness.
Why: Including data.columns.length and syncBlockDataColumns in the effect’s dependency array aligns with React’s recommendations and prevents stale reads or missed updates.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Changes Made
How to Test
Notes