Skip to content

Commit

Permalink
fix: flatten headers to allow repeated events to be sorted
Browse files Browse the repository at this point in the history
  • Loading branch information
martinkrulltott committed Mar 7, 2024
1 parent 81871f7 commit 9ba34a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Dialogs/Conditions/ConditionsManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ const ConditionsManager = ({
</Tab>
{disableRepeatableTab ? (
<Tooltip
key={`repeatable-tooltip`}
key="repeatable-tooltip"
placement="bottom"
content={i18n.t(
'Only available for repeatable stages'
Expand Down
3 changes: 2 additions & 1 deletion src/components/Visualization/Visualization.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export const Visualization = ({

if (headers && sortField) {
// reset sorting if current sortField has been removed from Columns DHIS2-13948
if (!headers.includes(sortField)) {
if (!headers.flat().includes(sortField)) {
setSorting({
sortField: null,
sortDirection: DEFAULT_SORT_DIRECTION,
Expand Down Expand Up @@ -576,6 +576,7 @@ export const Visualization = ({
) ? (
<Tooltip
content={i18n.t('No event')}
key={`${rowIndex}_${columnIndex}-tooltip`}
>
{(props) =>
renderCellContent({
Expand Down

0 comments on commit 9ba34a4

Please sign in to comment.