Web:Files/Components: add comments for change sectio view method

This commit is contained in:
Timofey Boyko 2022-05-17 16:39:37 +03:00
parent 2aeed8e287
commit dd8fba5eca
4 changed files with 4 additions and 7 deletions

View File

@ -279,11 +279,7 @@ class Section extends React.Component {
return (
<>
{isSectionAvailable && (
<ReactResizeDetector
refreshRate={100}
refreshMode="debounce"
refreshOptions={{ trailing: true }}
>
<ReactResizeDetector>
{({ width, height }) => (
<Provider
value={{

View File

@ -236,6 +236,7 @@ class TableHeader extends React.Component {
? containerRef.current
: document.getElementById("table-container");
// 400 - it is desktop info panel width
const minSize = infoPanelVisible ? size.tablet - 400 : size.tablet;
if (

View File

@ -67,7 +67,7 @@ const FilesRowContainer = ({
}) => {
useEffect(() => {
if ((viewAs !== "table" && viewAs !== "row") || !sectionWidth) return;
// 400 - it is desktop info panel width
if (
(sectionWidth < 1025 && !infoPanelVisible) ||
(sectionWidth < 625 && infoPanelVisible) ||

View File

@ -110,7 +110,7 @@ const Table = ({
useEffect(() => {
if ((viewAs !== "table" && viewAs !== "row") || !setViewAs) return;
// 400 - it is desktop info panel width
if (
(sectionWidth < 1025 && !infoPanelVisible) ||
(sectionWidth < 625 && infoPanelVisible) ||