Dynamic Project Task Management Table
Livspace manages numerous interior design projects, each comprising various tasks such as design, procurement, and installation. Project managers require a centralized, interactive dashboard to efficiently track task progress, assignees, and deadlines. This problem challenges you to build a core component of such a dashboard: a dynamic table capable of displaying project tasks with robust client-side sorting and filtering capabilities.
Your goal is to implement a React component that displays a list of project tasks in a table format, allowing users to interactively sort and filter the data.
Task data.Task Name, Deadline, and Status columns. Clicking a header should sort the table by that column, toggling between ascending and descending order on successive clicks.status (e.g., 'All', 'Pending', 'In Progress', 'Completed').taskName or assignee fields.mockTasks data correctly on initial load.Task Name header sorts tasks alphabetically (A-Z, then Z-A).Deadline header sorts tasks chronologically (earliest to latest, then latest to earliest).Status header sorts tasks alphabetically (A-Z, then Z-A).taskName or assignee contains the search term (case-insensitive).Constraints
mockTasks data.mockTasks array is the sole source of data.useState, useMemo) for managing UI interactions and data transformations.Loading editor...