Skip to content

Commit

Permalink
Backed out changeset fce0a89353f1 (bug 1606161) for failing at /brows…
Browse files Browse the repository at this point in the history
…er_net_har_copy_all_as_har.js on a CLOSED TREE.
  • Loading branch information
raulgurzau committed Jan 2, 2020
1 parent 1484f88 commit a49bfa1
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -438,11 +438,19 @@ class RequestListHeader extends Component {
*/
shouldUpdateWidths() {
const visibleColumns = this.getVisibleColumns();
const columnsData = this.props.columnsData;
let totalPercent = 0;

visibleColumns.forEach(col => {
totalPercent += columnsData.get(col.name).width;
const name = col.name;
const headerRef = this.refs[`${name}Header`];
// Get column width from style.
let widthFromStyle = 0;
// In case the column is in visibleColumns but has display:none
// we don't want to count its style.width into totalPercent.
if (headerRef.getBoundingClientRect().width > 0) {
widthFromStyle = headerRef.style.width.slice(0, -1);
}
totalPercent += +widthFromStyle; // + converts it to a number
});

// Do not update if total percent is from 99-101% or when it is 0
Expand Down

0 comments on commit a49bfa1

Please sign in to comment.