refactor: setting filters as null if value is an empty array (#483)
* refractor: added params to fetch key * feat: create views directly from views list page fix: selected filter not showing up in multi-level dropdown, refactor: arranged imports * refactor: setting filters as null if value is an empty array
This commit is contained in:
parent
bf09673d09
commit
9c388d8e50
1 changed files with 6 additions and 0 deletions
|
|
@ -336,6 +336,12 @@ export const IssueViewContextProvider: React.FC<{ children: React.ReactNode }> =
|
|||
|
||||
const setFilters = useCallback(
|
||||
(property: Partial<IIssueFilterOptions>) => {
|
||||
Object.keys(property).forEach((key) => {
|
||||
if (property[key as keyof typeof property]?.length === 0) {
|
||||
property[key as keyof typeof property] = null;
|
||||
}
|
||||
});
|
||||
|
||||
dispatch({
|
||||
type: "SET_FILTERS",
|
||||
payload: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue