note about remounting that needs fixing

This commit is contained in:
talksik
2022-05-08 08:01:50 -05:00
parent 5544d64c92
commit b9c3905aa7
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -8,6 +8,6 @@
"editor.defaultFormatter": "esbenp.prettier-vscode",
"workbench.colorTheme": "Default Light+",
"javascript.format.semicolons": "insert",
"window.zoomLevel": 1,
"window.zoomLevel": 0,
"trunk.trunkGrayOutNonBlockingIssues": false
}
@@ -33,6 +33,11 @@ export default function NirvanaTerminal() {
// console.log(linesMap);
}, [linesMap]);
// ! remounting when toggle tuning and untoggle tuning a line
// because it changes the list that it's in...solution 1: put everything in one list and use one sort to handle toggle tuned items to be clean
// the change in the object or the property which is specifically currentUserMember of the masterLineData sent in to line row
// causes a re-render but not a unmount and remount
const allLines: MasterLineData[] = useMemo(() => {
const masterLines: MasterLineData[] = Object.values(linesMap);