Web: Components: Table: fixed "Maximum call stack size exceeded"

This commit is contained in:
Nikita Gopienko 2024-07-12 14:04:12 +03:00
parent 934c8de98a
commit 117b8c776d

View File

@ -39,6 +39,7 @@ import { TTableColumn, TableHeaderProps } from "./Table.types";
import { TableSettings } from "./sub-components/TableSettings"; import { TableSettings } from "./sub-components/TableSettings";
import { TableHeaderCell } from "./sub-components/TableHeaderCell"; import { TableHeaderCell } from "./sub-components/TableHeaderCell";
import { checkingForUnfixedSize, getSubstring } from "./Table.utils"; import { checkingForUnfixedSize, getSubstring } from "./Table.utils";
import { isDesktop } from "../../utils";
const defaultMinColumnSize = 110; const defaultMinColumnSize = 110;
const settingsSize = 24; const settingsSize = 24;
@ -346,6 +347,8 @@ class TableHeader extends React.Component<
setHideColumns, setHideColumns,
} = this.props; } = this.props;
if (!isDesktop()) return;
let activeColumnIndex = null; let activeColumnIndex = null;
const container = containerRef.current const container = containerRef.current