Skip to content

Commit 281af4a

Browse files
Filtering new ‘text list’ attribute type
1 parent 02d8668 commit 281af4a

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

src/components/projects/projectId/data-browser/SearchGroups.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ export default function SearchGroups(props: SearchGroupsProps) {
630630
}
631631
</div>
632632
</div>
633-
{(uniqueValuesDict && uniqueValuesDict[groupItem['name']] && groupItem['operator'] != '' && groupItem['operator'] != 'BETWEEN' && groupItem['operator'] != 'IN' && groupItem['operator'] != 'IN WC' || saveAttributeType == DataTypeEnum.TEXT_LIST) ? (
633+
{(uniqueValuesDict && uniqueValuesDict[groupItem['name']] && groupItem['operator'] != '' && groupItem['operator'] != 'BETWEEN' && groupItem['operator'] != 'IN' && groupItem['operator'] != 'IN WC') ? (
634634
<div className="my-2">
635635
<KernDropdown options={uniqueValuesDict[groupItem['name']]} buttonName={groupItem['searchValue'] ? groupItem['searchValue'] : 'Select value'}
636636
selectedOption={(option: any) => selectValueDropdown(option, index, 'searchValue', group.key)} fontClass="font-dmMono" />

src/util/components/projects/projectId/data-browser/data-browser-helper.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,6 @@ export function postProcessUniqueValues(uniqueValues: any, attributesSortOrder:
178178
const attributeType = attributesSortOrder.find(att => att.name == key)?.dataType;
179179
if (attributeType == DataTypeEnum.TEXT || attributeType == DataTypeEnum.LLM_RESPONSE) {
180180
delete uniqueValuesDict[key];
181-
} else if (attributeType == DataTypeEnum.TEXT_LIST) {
182-
const uniqueSet = new Set<string>();
183-
for (const item of uniqueValuesDict[key]) {
184-
JSON.parse(item).forEach(str => uniqueSet.add(str));
185-
}
186-
uniqueValuesDict[key] = Array.from(uniqueSet);
187181
}
188182
}
189183
return uniqueValuesDict;

0 commit comments

Comments
 (0)