mirror of
https://github.com/urosran/cally.git
synced 2025-11-26 08:24:55 +00:00
- Improvements to the todo filter
This commit is contained in:
@ -110,15 +110,12 @@ const ToDosList = ({ isSettings }: { isSettings?: boolean }) => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (toDos && selectedFilter) {
|
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 || []);
|
let filteredGroupedTodos = groupToDosByDate(filtered || []);
|
||||||
setGroupedToDos(filteredGroupedTodos || []);
|
setGroupedToDos(filteredGroupedTodos || []);
|
||||||
}
|
}
|
||||||
}, [selectedFilter]);
|
}, [selectedFilter, JSON.stringify(toDos)]);
|
||||||
|
|
||||||
console.log("MEMBERS");
|
|
||||||
console.log(members);
|
|
||||||
|
|
||||||
const toggleExpand = (dateKey: string) => {
|
const toggleExpand = (dateKey: string) => {
|
||||||
setExpandedGroups((prev) => ({
|
setExpandedGroups((prev) => ({
|
||||||
@ -341,7 +338,7 @@ const styles = StyleSheet.create({
|
|||||||
fontSize: 13.2,
|
fontSize: 13.2,
|
||||||
color: "#fd1775",
|
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 },
|
itemStyle: { padding: 0, margin: 0 },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user