@kit-data-manager/react-search-component
Version:
All-in-one component for rendering an elastic search UI for searching anything. Built-in support for visualizing related items in a graph and resolving unique identifiers.
18 lines • 711 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { SearchContext } from "@elastic/react-search-ui";
/**
* Dirty hack to add a non-functional SearchContext to Storybook stories. Only required for making showcases work for GenericResultView and RelationsGraph.
* Not used for testing, as it does not work at all.
* @param props
* @constructor
*/
export function MockSearchProvider(props) {
const fakeDriver = {
getState() { },
getActions() { },
unsubscribeToStateChanges() { },
subscribeToStateChanges() { }
};
return _jsx(SearchContext.Provider, { value: { driver: fakeDriver }, children: props.children });
}
//# sourceMappingURL=MockSearchProvider.js.map