Bug 1352777 - Fix dropmarkers in JSON viewer not collapsing long string. r=rickychien, a=jcristau
authorMatt R <matthieu.rigolot@gmail.com>
Mon, 24 Apr 2017 08:35:09 +0100
changeset 574163 3d9699ce0b0a19890579a6644b9754b34092e3a6
parent 574162 ffe5677aac10c9d45c22fa3e1005737005a3e4c4
child 574164 af2d7ae3f4aed9266a27ff4e0f7578fd3fc08037
push id57592
push userbmo:cpearce@mozilla.com
push dateMon, 08 May 2017 10:55:22 +0000
reviewersrickychien, jcristau
bugs1352777
milestone54.0
Bug 1352777 - Fix dropmarkers in JSON viewer not collapsing long string. r=rickychien, a=jcristau MozReview-Commit-ID: BdixqPyi8x4
devtools/client/shared/components/tree/tree-cell.js
--- a/devtools/client/shared/components/tree/tree-cell.js
+++ b/devtools/client/shared/components/tree/tree-cell.js
@@ -37,17 +37,18 @@ define(function (require, exports, modul
     },
 
     /**
      * Optimize cell rendering. Rerender cell content only if
      * the value or expanded state changes.
      */
     shouldComponentUpdate: function (nextProps, nextState) {
       return (this.props.value != nextProps.value) ||
-        (this.state !== nextState);
+        (this.state !== nextState) ||
+        (this.props.member.open != nextProps.member.open);
     },
 
     getCellClass: function (object, id) {
       let decorator = this.props.decorator;
       if (!decorator || !decorator.getCellClass) {
         return [];
       }