diff --git a/src/renderer/components/item-object-list/placeholder.module.scss b/src/renderer/components/item-object-list/placeholder.module.scss index 95ebc029fb..25c8f8c942 100644 --- a/src/renderer/components/item-object-list/placeholder.module.scss +++ b/src/renderer/components/item-object-list/placeholder.module.scss @@ -18,12 +18,17 @@ &.actionColumn { flex: 0 0 55px; + + .line { + width: 100%; + } } } } .line { - width: 100%; + width: 90%; + max-width: 290px; height: 0px; padding: 3px; border-radius: 4px; diff --git a/src/renderer/components/item-object-list/placeholder.tsx b/src/renderer/components/item-object-list/placeholder.tsx index 0dbeb62c80..e78c70166a 100644 --- a/src/renderer/components/item-object-list/placeholder.tsx +++ b/src/renderer/components/item-object-list/placeholder.tsx @@ -7,13 +7,15 @@ import styles from "./placeholder.module.scss"; import React from "react"; import type { TableCellProps } from "../table"; +import { UserStore } from "../../../common/user-store"; interface Props { renderTableHeader: TableCellProps[]; showExtraColumn?: boolean; + tableId: string; } -export function Placeholder({ renderTableHeader, showExtraColumn = true }: Props) { +export function Placeholder({ renderTableHeader, showExtraColumn = true, tableId }: Props) { const linesNumber = 3; function renderLines() { @@ -28,9 +30,15 @@ export function Placeholder({ renderTableHeader, showExtraColumn = true }: Props return React.Children.toArray(lines); } + function showColumn({ id: columnId, showWithColumn }: TableCellProps): boolean { + return !UserStore.getInstance().isTableColumnHidden(tableId, columnId, showWithColumn); + } + + const filteredColumns = renderTableHeader.filter(showColumn); + return ( -
- {renderTableHeader.map((cellProps) => { +