Skip to content

Commit

Permalink
Web: Components: changed the logic for calculating the width of the c…
Browse files Browse the repository at this point in the history
…olumns after deletion
  • Loading branch information
gopienkonikita committed Oct 6, 2021
1 parent f8fe418 commit 52a8c3f
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions packages/asc-web-components/table-container/TableHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,17 @@ class TableHeader extends React.Component {

if (!enable) {
gridTemplateColumns.push("0px");
gridTemplateColumns[1] =
this.getSubstring(gridTemplateColumns[1]) +

let colIndex = 1;
let leftEnableColumn = gridTemplateColumns[index - colIndex];
while (leftEnableColumn === "0px") {
colIndex++;
leftEnableColumn = gridTemplateColumns[index - colIndex];
}

//added the size of the disabled column to the left column
gridTemplateColumns[index - colIndex] =
this.getSubstring(gridTemplateColumns[index - colIndex]) +
this.getSubstring(item) +
"px";
} else if (item !== `${settingsSize}px` && item !== checkboxSize) {
Expand Down

0 comments on commit 52a8c3f

Please sign in to comment.