<miso-explore>

The container of the Explore workflow of a unit. Miso elements inside it show the questions related to the page:

<miso-explore>
  <miso-related-questions></miso-related-questions>
  <miso-query></miso-query>
</miso-explore>

A page can have more than one <miso-explore> for the same unit. Each one connects the elements in it to the same workflow.

To add Explore to a page, see Explore — Quick Start.

Elements

ElementShows
<miso-error>The error message shown when the workflow fails.
<miso-query>The query box.
<miso-related-questions>The questions related to the page.

Attributes

unit-id

Picks the unit. Each unit is a workflow of its own, with its own questions and options. Without the attribute, the container uses the default unit.

<miso-explore unit-id="sidebar">
  <miso-related-questions></miso-related-questions>
</miso-explore>

Give every container of one unit the same unit-id. To set the options of one unit, get its workflow with client.ui.explores.get('sidebar').

Controls the Miso logo at the end of the container.

ValueThe logo shows
Attribute left outWhen the container holds <miso-related-questions>, once the questions arrive.
trueOnce the questions arrive.
falseNever.

Any other value is an error. To turn the logo off in every <miso-explore>:

client.ui.explores.useLayouts({
  container: { logo: false },
});

visible-when

Shows the container only in the states it names. It also works on an element inside the container.

ValueShows the element when
initialThe workflow has not sent a request yet.
loadingThe request is out, and no data has arrived.
readyThe data is arriving or has arrived.
ongoingThe data is still arriving.
doneAll the data has arrived.
erroneousThe request failed.
emptyNo Miso element in the container has data.
nonemptyAt least one Miso element in the container has data.
  • Separate values with spaces to show the element in any of them: visible-when="initial loading".
  • Join a state to empty or nonempty with + to need both: visible-when="ready+empty".
  • Only the Miso elements that show data count toward empty and nonempty. The query box and the buttons do not.
  • The SDK shows the element with display: block !important. To lay it out as a flex row or a grid, put visible-when on a wrapper around it.

Next