fix(doctors): improve filter performance and resolve modal closing issues
This commit is contained in:
+5
-3
@@ -213,12 +213,14 @@ export function clearDoctorClinicParams(router, slug) {
|
||||
router.push(newUrl)
|
||||
}
|
||||
export const filterList = (data) => {
|
||||
const parentList = specialties.filter((item) => !item.parent);
|
||||
const childrenList = specialties.filter((item) => item.parent);
|
||||
const parentList = specialties.filter((item) => !item.parent_id);
|
||||
const childrenList = specialties.filter((item) => item.parent_id);
|
||||
|
||||
const filteredChildrenList =
|
||||
data && data.category
|
||||
? childrenList.filter((item) => item.parent === data.category.id)
|
||||
? childrenList.filter(
|
||||
(item) => String(item.parent_id) === String(data.category.id)
|
||||
)
|
||||
: [];
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user