fix: fixed the selection and delete widget

This commit is contained in:
paul
2024-09-13 12:28:32 +05:30
parent c94fd3918d
commit 23f1e08fbc
7 changed files with 170 additions and 57 deletions

14
src/utils/common.js Normal file
View File

@@ -0,0 +1,14 @@
// contains commonly used functions to manipulate objects, array etc.
export function removeDuplicateObjects(array, key) {
const seen = new Set()
return array.filter(item => {
if (!seen.has(item[key])) {
seen.add(item[key])
return true
}
return false
})
}