From 2a7d1a41dc897018a2bf17d3ca9f85cfb66bbb5f Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 15 May 2022 15:47:03 -0700 Subject: Add missing position values --- modern/src/reports/components/ColumnSelect.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'modern/src/reports/components') diff --git a/modern/src/reports/components/ColumnSelect.js b/modern/src/reports/components/ColumnSelect.js index 991f21e7..d7306c58 100644 --- a/modern/src/reports/components/ColumnSelect.js +++ b/modern/src/reports/components/ColumnSelect.js @@ -5,7 +5,9 @@ import { import { useTranslation } from '../../common/components/LocalizationProvider'; import { useFilterStyles } from './ReportFilter'; -const ColumnSelect = ({ columns, setColumns, columnsArray }) => { +const ColumnSelect = ({ + columns, setColumns, columnsArray, columnsObject, +}) => { const classes = useFilterStyles(); const t = useTranslation(); @@ -19,9 +21,13 @@ const ColumnSelect = ({ columns, setColumns, columnsArray }) => { renderValue={(it) => it.length} multiple > - {columnsArray.map(([key, string]) => ( - {t(string)} - ))} + {columnsArray + ? columnsArray.map(([key, string]) => ( + {t(string)} + )) + : Object.keys(columnsObject).map((key) => ( + {columnsObject[key].name} + ))} -- cgit v1.2.3