@equinor/fusion
Advanced tools
Comparing version 0.1.24 to 0.1.25
@@ -141,5 +141,6 @@ import { useState, useCallback, useEffect } from "react"; | ||
const apiClients = useApiClients(); | ||
const canQueryWithText = (text) => !!text && text.length > 2; | ||
const fetchContexts = useCallback(async (query) => { | ||
if (query && query.length > 2) { | ||
setIsQuerying(true); | ||
if (canQueryWithText(query)) { | ||
setContexts([]); | ||
try { | ||
@@ -152,2 +153,3 @@ var response = await apiClients.context.queryContextsAsync(query, ...types); | ||
setError(e); | ||
setContexts([]); | ||
setIsQuerying(false); | ||
@@ -159,2 +161,3 @@ } | ||
const search = (query) => { | ||
setIsQuerying(canQueryWithText(query)); | ||
setQueryText(query); | ||
@@ -161,0 +164,0 @@ }; |
{ | ||
"name": "@equinor/fusion", | ||
"version": "0.1.24", | ||
"version": "0.1.25", | ||
"description": "Everything a Fusion app needs to communicate with the core", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
107805
2482