Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding taskFilter property to mgt-tasks #211

Merged
merged 2 commits into from
Nov 25, 2019
Merged

Conversation

nmetulev
Copy link
Contributor

PR Type

  • Feature

Description of the changes

This PR is adding the taskFilter property to the mgt-tasks component to allow additional filtering of tasks. The taskFilter must be a function that accepts a task object as a parameter and returns true if the task should be rendered, false otherwise. The task object can be a planner task or an outlook (todo) task depending on the source the developer is using.

For example, I developer could choose to only render tasks in a specific category by providing the following filter:

let taskView = document.querySelector('mgt-tasks');
taskView.taskFilter = task => task.appliedCategories.category3;

@nmetulev nmetulev requested a review from vogtn November 22, 2019 21:51
@nmetulev nmetulev merged commit c8c2f19 into master Nov 25, 2019
@nmetulev nmetulev deleted the nmetulev/taskFilter branch November 25, 2019 16:32
@nmetulev nmetulev mentioned this pull request Nov 27, 2019
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants