fix: issues mutation on changing filters (#2485)
* chore: refetch issues on filters and display filters change * fix: issues list mutation after creating an issue * fix: module issues fetch * fix: build error
This commit is contained in:
parent
85a471305a
commit
0b8367a262
16 changed files with 173 additions and 181 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { observable, action, makeObservable, runInAction, computed } from "mobx";
|
||||
import { observable, action, makeObservable, runInAction, computed, autorun } from "mobx";
|
||||
// services
|
||||
import { IssueService } from "services/issue";
|
||||
// helpers
|
||||
|
|
@ -79,8 +79,22 @@ export class ProjectViewIssuesStore implements IProjectViewIssuesStore {
|
|||
});
|
||||
|
||||
this.rootStore = _rootStore;
|
||||
|
||||
this.issueService = new IssueService();
|
||||
|
||||
autorun(() => {
|
||||
const workspaceSlug = this.rootStore.workspace.workspaceSlug;
|
||||
const projectId = this.rootStore.project.projectId;
|
||||
const viewId = this.rootStore.projectViews.viewId;
|
||||
|
||||
if (
|
||||
workspaceSlug &&
|
||||
projectId &&
|
||||
viewId &&
|
||||
this.rootStore.projectViewFilters.storedFilters[viewId] &&
|
||||
this.rootStore.issueFilter.userDisplayFilters
|
||||
)
|
||||
this.fetchViewIssues(workspaceSlug, projectId, viewId, this.rootStore.projectViewFilters.storedFilters[viewId]);
|
||||
});
|
||||
}
|
||||
|
||||
computedFilter = (filters: any, filteredParams: any) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue