Explore module - search box only
Display only the search box
Since 1.9.1
You can use the explore module with only a search box, without displaying related questions. This is useful when you want to provide a simple search entry point.
HTML setup
Place only the <miso-query> element inside the explore container:
<miso-explore>
<miso-query></miso-query>
</miso-explore>
JavaScript setup
Start the workflow with relatedQuestions: false:
const client = new MisoClient(`${apiKey}`);
const workflow = client.ui.explore;
workflow.useLink(question => `/answers?q=${encodeURIComponent(question)}`);
// start the workflow without related questions
workflow.start({
relatedQuestions: false,
});
- Note that you don't need to call
useApiwithproduct_idin this scenario, since no related questions are generated.