- Improvements to the todo filter

This commit is contained in:
Dejan
2024-11-17 22:53:11 +01:00
parent c1f7113dfc
commit c9b796bd40

View File

@ -110,15 +110,12 @@ const ToDosList = ({ isSettings }: { isSettings?: boolean }) => {
useEffect(() => {
if (toDos && selectedFilter) {
let filtered = toDos?.filter((todo) => todo.creatorId === selectedFilter.value);
let filtered = toDos?.filter((todo) => todo.assignees?.includes(selectedFilter.value) || todo.creatorId === selectedFilter.value) || [];
let filteredGroupedTodos = groupToDosByDate(filtered || []);
setGroupedToDos(filteredGroupedTodos || []);
}
}, [selectedFilter]);
console.log("MEMBERS");
console.log(members);
}, [selectedFilter, JSON.stringify(toDos)]);
const toggleExpand = (dateKey: string) => {
setExpandedGroups((prev) => ({
@ -341,7 +338,7 @@ const styles = StyleSheet.create({
fontSize: 13.2,
color: "#fd1775",
},
dropdownStyle: { borderRadius: 6.61, height: "100%", width: 187 },
dropdownStyle: { borderRadius: 6.61, minHeight: 10, maxHeight: "100%", width: 187 },
itemStyle: { padding: 0, margin: 0 },
});