[WEB-811] chore: filter dropdown custom date select improvement (#4043)

* fix: handled custom start_date and target_date custom filter in project-issues

* chore: filter dropdown improvement

---------

Co-authored-by: gurusainath <gurusainath007@gmail.com>
This commit is contained in:
Anmol Singh Bhatia 2024-03-22 18:38:39 +05:30 committed by GitHub
parent e4211e5817
commit 5c7886d7f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 48 additions and 4 deletions

View file

@ -60,8 +60,10 @@ export const ProjectIssuesHeader: React.FC = observer(() => {
const newValues = issueFilters?.filters?.[key] ?? [];
if (Array.isArray(value)) {
// this validation is majorly for the filter start_date, target_date custom
value.forEach((val) => {
if (!newValues.includes(val)) newValues.push(val);
else newValues.splice(newValues.indexOf(val), 1);
});
} else {
if (issueFilters?.filters?.[key]?.includes(value)) newValues.splice(newValues.indexOf(value), 1);