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:
Dakshesh Jain 2023-03-21 17:11:04 +05:30 committed by GitHub
parent bf09673d09
commit 9c388d8e50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -336,6 +336,12 @@ export const IssueViewContextProvider: React.FC<{ children: React.ReactNode }> =
const setFilters = useCallback( const setFilters = useCallback(
(property: Partial<IIssueFilterOptions>) => { (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({ dispatch({
type: "SET_FILTERS", type: "SET_FILTERS",
payload: { payload: {