(null);
@@ -36,14 +36,14 @@ const ChangelogFilterBarPlain = ({
setOpenMenu(null);
if (value === 'SHOW_ALL') {
setFilterValue('SHOW_ALL');
- setfieldToFilterBy(null);
+ setAttributeToFilterBy(null);
} else {
const column = getFilterColumn(value.id);
setFilterValue(value);
- setfieldToFilterBy(column);
+ setAttributeToFilterBy(column);
}
},
- [setFilterValue, setfieldToFilterBy],
+ [setFilterValue, setAttributeToFilterBy],
);
const dataItems = useMemo(
@@ -55,7 +55,7 @@ const ChangelogFilterBarPlain = ({
[dataItemDefinitions],
);
- const selectedFilterValue = fieldToFilterBy ? filterValue : 'SHOW_ALL';
+ const selectedFilterValue = attributeToFilterBy ? filterValue : 'SHOW_ALL';
return (
diff --git a/src/core_modules/capture-core/components/WidgetsChangelog/common/hooks/useChangelogData.js b/src/core_modules/capture-core/components/WidgetsChangelog/common/hooks/useChangelogData.js
index 24806b4308..7fb2ae8da7 100644
--- a/src/core_modules/capture-core/components/WidgetsChangelog/common/hooks/useChangelogData.js
+++ b/src/core_modules/capture-core/components/WidgetsChangelog/common/hooks/useChangelogData.js
@@ -18,9 +18,11 @@ type Props = {
export const useChangelogData = ({ entityId, entityType, programId }: Props) => {
const [columnToSortBy, setColumnToSortBy] = useState(COLUMN_TO_SORT_BY.DATE);
+ console.log('columnToSortBy', columnToSortBy);
const [sortDirection, setSortDirection] = useState(SORT_DIRECTION.DEFAULT);
- const [fieldToFilterBy, setfieldToFilterBy] = useState(null);
+ const [attributeToFilterBy, setAttributeToFilterBy] = useState(null);
+ console.log('attributeToFilterBy', attributeToFilterBy);
const [filterValue, setFilterValue] = useState