Merge pull request #391 from ONLYOFFICE/bugfix/table-add-column
bugfix/table-add-column
This commit is contained in:
commit
62b61487dc
@ -1521,6 +1521,19 @@ class TableHeader extends React.Component<
|
|||||||
} else if (item !== `${settingsSize}px`) {
|
} else if (item !== `${settingsSize}px`) {
|
||||||
const percent = (getSubstring(item) / oldWidth) * 100;
|
const percent = (getSubstring(item) / oldWidth) * 100;
|
||||||
|
|
||||||
|
if (percent === 100) {
|
||||||
|
const enableColumnsLength = columns.filter(
|
||||||
|
(column) => !column.defaultSize && column.enable,
|
||||||
|
).length;
|
||||||
|
|
||||||
|
if (enableColumnsLength !== 1) {
|
||||||
|
localStorage.removeItem(columnStorageName);
|
||||||
|
this.resetColumns();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let newItemWidth = defaultColumnSize
|
let newItemWidth = defaultColumnSize
|
||||||
? `${defaultColumnSize}px`
|
? `${defaultColumnSize}px`
|
||||||
: percent === 0
|
: percent === 0
|
||||||
|
Loading…
Reference in New Issue
Block a user