MCPcopy Create free account
hub / github.com/alephdata/aleph / getEntitySuggestions

Method getEntitySuggestions

ui/src/components/Entity/entityEditorWrapper.jsx:70–85  ·  view source on GitHub ↗
(queryText, schema)

Source from the content-addressed store, hash-verified

68 }
69
70 getEntitySuggestions(queryText, schema) {
71 const { collection, location } = this.props;
72 const query = entitySuggestQuery(location, collection, schema, {
73 prefix: queryText,
74 });
75
76 // throttle entities query request
77 clearTimeout(this.entitySuggestTimeout);
78 this.entitySuggestTimeout = setTimeout(() => {
79 this.props.queryEntities({ query });
80 }, 150);
81
82 return new Promise((resolve) => {
83 this.pendingPromises.push({ query, promiseResolve: resolve });
84 });
85 }
86
87 async createEntity(entity, local = true) {
88 const { collection, entitySetId, onStatusChange } = this.props;

Callers 1

renderMethod · 0.45

Calls 2

entitySuggestQueryFunction · 0.90
pushMethod · 0.80

Tested by

no test coverage detected