Browse Source

Set a sub-cell's hidden state to ensure consistent behavior for code cells

kgryte 5 years ago
parent
commit
ea3d90bb3d
1 changed files with 2 additions and 1 deletions
  1. 2 1
      packages/toc/src/generators/notebookgenerator/itemrenderer.tsx

+ 2 - 1
packages/toc/src/generators/notebookgenerator/itemrenderer.tsx

@@ -203,7 +203,8 @@ function setCollapsedState(
       const ow = c.outputArea.widgets[j] as Panel;
       ow.setHidden(state);
     }
-    // TODO: handle input widget hidden state
+    // Collapse/expand a sub-cell's input area by setting the its `hidden` state:
+    w.inputArea.setHidden(state);
   }
   if (state) {
     // Set a meta-data flag to indicate that we've collapsed notebook sections: