Module

EntitySearch

Provides a UI to search for and choose entities using plugin-supplied search methods.

Usage

<entity-search
  title="Find Asset"
  @submit="(assets) => onAssetSelected(assets)"
></entity-search>

With promoted results;

<entity-search
  title="Find Asset"
  @submit="(assets) => onAssetSelected(assets)"
>
 <template v-slot:promoted-results="{ searchRequest }">
   <div class="q-ml-lg q-mb-md">
     <q-item clickable to="/some-route-path">
       <q-item-section>
         <q-item-label>Shows above actual search results</q-item-label>
       </q-item-section>
     </q-item>
   </div>
 </template>
</entity-search>

Props

Name Type Default value Required? Description
title String - Yes the title to show at the top of the selector
entityType String - Yes the entity type to search
entityBundles Array.<String> null No the entity bundles to search from - or all if null
searchMethod String text-search No the initially selected search method
multiple Boolean false No allow selecting multiple entities
confirmLabel String Choose No the text of the button which confirms the current entity selection
noResultsLabel String No results found No the text shown when no results are found for a given search
additionalFilters Array.<Object> [] No Additional Orbit.js filters to apply to the searches

Events

Name Payload Type Description
searchMethodChanged String Emit currently selected search method
submit Array.<Entity> Emit selected entities