Skip to content

Commit 8666764

Browse files
committed
updates
1 parent 75214fc commit 8666764

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

components/databricks/databricks.app.mjs

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,20 @@ export default {
8484
type: "string",
8585
label: "Vector Search Index",
8686
description: "The name of the vector search index",
87-
async options() {
88-
const { vector_indexes } = await this.listVectorSearchIndexes();
89-
return vector_indexes?.map(({ name: value }) => ({
90-
value,
91-
label: value,
92-
})) || [];
87+
async options({ props }) {
88+
if (!props.endpointName) {
89+
return [];
90+
}
91+
const { vector_indexes = [] } = await this.listVectorSearchIndexes({
92+
params: {
93+
endpoint_name: props.endpointName,
94+
},
95+
});
96+
97+
return vector_indexes.map(({ name }) => ({
98+
value: name,
99+
label: name,
100+
}));
93101
},
94102
},
95103
},

0 commit comments

Comments
 (0)