fix: display same key with multiple data types in filter suggestions by enhancing the deduping logic (#7255)

* fix: display same key with multiple data types in filter suggestions by enhancing the deduping logic

* refactor: remove unnecessary .trim()
This commit is contained in:
Shaheer Kochai 2025-03-11 13:33:26 +04:30 committed by GitHub
parent 527d8a4fc9
commit 1e85981a17
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -170,7 +170,11 @@ export const useOptions = (
(option, index, self) =>
index ===
self.findIndex(
(o) => o.label === option.label && o.value === option.value, // to remove duplicate & empty options from list
(o) =>
// to remove duplicate & empty options from list
o.label === option.label &&
o.value === option.value &&
o.dataType?.toLowerCase() === option.dataType?.toLowerCase(), // handle case sensitivity
) && option.value !== '',
) || []
).map((option) => {