Skip to content

Search tasks by assignee name in search bar 馃懁#522

Description

@anoopcodehack

Search tasks by assignee name in search bar 馃懁

File: client/src/pages/Dashboard.jsx

Search only matches title and snippets 馃拃
Can't search "show me all of John's tasks" fr!!

Fix: extend search filter:
const filteredTasks = tasks.filter(t => {
const q = searchQuery.toLowerCase()
return (
t.title.toLowerCase().includes(q) ||
t.assignee?.name?.toLowerCase().includes(q) ||
t.tags?.some(tag => tag.toLowerCase().includes(q)) ||
t.snippets?.some(s =>
s.code.toLowerCase().includes(q))
)
})

// show search hint:

Search by title, assignee, tag or snippet

~8 lines! No backend needed 馃幆
Makes search actually useful!! 馃敟

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions