diff --git a/src/components/Dashboard/common/MissingPlaceholder.jsx b/src/components/Dashboard/common/MissingPlaceholder.jsx index 6d6be48e..9bf8c108 100644 --- a/src/components/Dashboard/common/MissingPlaceholder.jsx +++ b/src/components/Dashboard/common/MissingPlaceholder.jsx @@ -9,7 +9,8 @@ const MissingPlaceholder = ({ hasBackground = true, hasBorder = true, mutedBorder = false, - padding = '16px' + padding = '16px', + height = undefined }) => { var border = undefined if (hasBorder == false) { @@ -26,7 +27,8 @@ const MissingPlaceholder = ({ }} styles={{ body: { - padding: padding + padding: padding, + height: height } }} > @@ -52,7 +54,8 @@ MissingPlaceholder.propTypes = { hasBackground: PropTypes.bool, hasBorder: PropTypes.bool, mutedBorder: PropTypes.bool, - padding: PropTypes.string + padding: PropTypes.string, + height: PropTypes.string } export default MissingPlaceholder diff --git a/src/components/Dashboard/common/ObjectKanban.jsx b/src/components/Dashboard/common/ObjectKanban.jsx index 23d28d90..f8cd096b 100644 --- a/src/components/Dashboard/common/ObjectKanban.jsx +++ b/src/components/Dashboard/common/ObjectKanban.jsx @@ -9,7 +9,7 @@ import { useRef, useState } from 'react' -import { Empty, Flex } from 'antd' +import { Flex } from 'antd' import PropTypes from 'prop-types' import classNames from 'classnames' import { ApiServerContext } from '../context/ApiServerContext' @@ -27,6 +27,7 @@ import { toKanbanColumnsConfig } from './viewModeUtils' import { areValuesEqual } from '../utils/Utils' +import MissingPlaceholder from './MissingPlaceholder' const KANBAN_COLUMN_WIDTH = KANBAN_DEFAULT_COLUMN_WIDTH const KANBAN_GAP = 16 @@ -917,17 +918,25 @@ const ObjectKanban = forwardRef( if (!categoryProperty) { return ( - - + + ) } if (hasLoaded && categoryValues.length === 0) { return ( - - - + ) } diff --git a/src/components/Dashboard/common/ObjectTable.jsx b/src/components/Dashboard/common/ObjectTable.jsx index 173f5ea5..ceadab9c 100644 --- a/src/components/Dashboard/common/ObjectTable.jsx +++ b/src/components/Dashboard/common/ObjectTable.jsx @@ -61,6 +61,7 @@ import { ObjectTableFilterContext } from './ObjectTableFilterContext' import ObjectListViewContext from '../context/ObjectListViewContext' import { isCardsView, isKanbanView, normalizeViewMode } from './viewModeUtils' import { areValuesEqual } from '../utils/Utils' +import MissingPlaceholder from './MissingPlaceholder' import LoadingPlaceholder from './LoadingPlaceholder' const logger = loglevel.getLogger('DasboardTable') @@ -2017,6 +2018,14 @@ const ObjectTable = forwardRef( ) })} + {!lazyLoading && tableData.length <= 0 && ( + + )} {lazyLoading && tableData.length <= 0 && (