Skip to content

Commit 1e9bb2d

Browse files
committed
Adjusting searchable properties to be more clear
1 parent 2feb0e2 commit 1e9bb2d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

components/hubspot/actions/search-crm/search-crm.mjs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,20 @@ export default {
7171
schema = await this.hubspot.getSchema({
7272
objectType,
7373
});
74+
const properties = schema.properties;
75+
const searchableProperties = schema.searchableProperties?.map((prop) => {
76+
const propData = properties.find(({ name }) => name === prop);
77+
return {
78+
label: propData.label,
79+
value: propData.name,
80+
};
81+
});
7482

7583
props.searchProperty = {
7684
type: "string",
7785
label: "Search Property",
7886
description: "The field to search",
79-
options: schema.searchableProperties,
87+
options: searchableProperties,
8088
};
8189
} catch {
8290
props.searchProperty = {

0 commit comments

Comments
 (0)